Overview
This node listens to messages from a Solace PubSub+ queue with guaranteed delivery. It connects to a specified queue and consumes messages, supporting various message payload formats including automatic detection, raw binary, JSON, and Protocol Buffers. The node is designed for scenarios where reliable message consumption from Solace queues is required, such as integrating Solace event streams into workflows, processing real-time data feeds, or bridging Solace messaging with other systems.
Practical examples:
- Consuming order events from a Solace queue in an e-commerce system to trigger downstream processing.
- Listening to IoT device telemetry messages encoded in Protocol Buffers for analytics pipelines.
- Processing JSON-formatted notifications from a Solace queue to update CRM records.
Properties
| Name | Meaning |
|---|---|
| Queue Name | The name of the Solace queue to consume messages from, ensuring guaranteed delivery. |
| Message Format | Format of the incoming message payload. Options: Auto Detect (try to detect format automatically), Binary (treat as raw binary data), JSON (parse as JSON), Protocol Buffers (decode using provided protobuf schema). |
| Protobuf Schema | Protocol Buffers schema definition in .proto format, required if Message Format is set to Protocol Buffers. |
| Message Type | Name of the message type defined in the protobuf schema, required if Message Format is Protocol Buffers. |
| Options | Collection of additional options: |
| - Include Message Properties | Whether to include Solace message properties (like message ID, correlation ID, delivery mode) in the output. Default: true. |
| - Auto Acknowledge | Whether to automatically acknowledge messages after processing (recommended to keep true for guaranteed delivery). |
| - Parallel Processing | Whether to process messages in parallel (recommended false to maintain guaranteed processing order). |
| - Include Binary Payload | Whether to include the raw binary payload encoded as base64 in the output. |
| - Consumer Window Size | Maximum number of unacknowledged messages the consumer can receive concurrently. Default is 1. |
Output
The node outputs JSON objects representing each consumed message with the following structure:
queue: Name of the queue the message was received from.timestamp: ISO string timestamp when the message was processed.messageId: Application message ID.isRedelivered: Boolean indicating if the message was redelivered.deliveryCount: Number of times the message has been delivered.payload: The decoded message payload, format depends on the selected message format:- For JSON: parsed JSON object.
- For Protocol Buffers: decoded object according to the protobuf schema.
- For Binary: raw binary data as a buffer or string.
- For Auto: tries JSON parse, otherwise raw or text.
format: Indicates the detected or used format (json,protobuf,binary,text, ornone).parseError(optional): If parsing failed, contains error message.properties(optional): Object containing Solace message properties such as correlation ID, delivery mode, priority, time to live, reply-to destination, sequence number, etc.userProperties(optional): Key-value map of user-defined message properties.binaryPayload(optional): Base64 encoded raw binary payload if "Include Binary Payload" option is enabled.
If the node processes binary data, the raw payload can be included as base64 encoded string under binaryPayload.
Dependencies
- Requires connection to a Solace PubSub+ broker with appropriate credentials (host URL, VPN name, username, password, client name).
- Uses the
solclientjslibrary to connect and consume messages from Solace. - For Protocol Buffers decoding, uses the
protobufjslibrary and requires a valid protobuf schema and message type. - Node configuration must include an API key credential or equivalent authentication token for Solace access.
- Network connectivity to the Solace broker's WebSocket or TCP endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing queue name will cause the node to fail immediately.
- Incorrect host URL format or unsupported protocol will prevent connection.
- Connection failures due to network issues, firewall restrictions, or broker not running.
- Authentication failures due to incorrect username, password, or VPN name.
- Queue consumer connection failure if the queue does not exist or permissions are insufficient.
- Parsing errors for JSON or Protocol Buffers if the payload does not match the expected format or schema.
Error messages and resolutions:
- "Queue name is required": Provide a valid queue name.
- "Invalid Host URL format": Ensure the host URL is a valid ws://, wss://, tcp://, or tcps:// URL.
- "Connection failed: ECONNREFUSED": Check that the Solace broker is running, the host and port are correct, and no firewall blocks the connection.
- "Authentication failed": Verify credentials including username, password, and VPN name.
- "Queue consumer connection failed": Confirm the queue exists and the user has permission to consume from it.
- Protobuf parsing error: Validate the protobuf schema and message type; ensure the payload matches the schema.
- JSON parsing error: Confirm the message payload is valid JSON or adjust the message format setting.
Enabling "Allow Self-Signed Certificates" in credentials may be necessary if connecting to brokers with self-signed SSL certificates.
Links and References
- Solace PubSub+ Documentation
- Protocol Buffers Official Site
- protobufjs GitHub Repository
- Solace JavaScript API Reference
This summary is based solely on static analysis of the provided source code and property definitions.