RabbitMQ Consumer
n this article
Overview
You can use this Snap to fetch messages from a RabbitMQ destination.
Snap Type
RabbitMQ Consumer Snap is a READ-type Snap.
Prerequisites
Access to the RabbitMQ Server.
Privileges to perform various actions on the Queues such as receive and send messages.
Support for Ultra Pipelines
Works in Ultra Tasks.
Snap Views
Type | Format | Examples of Upstream and Downstream Snaps |
|---|---|---|
Input | The Snap does not require input data. Input documents may be used to evaluate any JavaScript expression in the File property. | Upstream Snap is optional. You can connect any Snap with a document output view, such as Mapper or Copy Snaps upstream of this Snap. |
Output | Message consumed from RabbitMQ server as a binary document.
|
|
Error | Learn more about Error handling in Pipelines. | |
Snap Settings
Asterisk ( * ): Indicates a mandatory field.
Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
Expression icon ( ): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon ( ): Indicates that you can add fields in the fieldset.
Remove icon ( ): Indicates that you can remove fields from the fieldset.
Field Name | Field Type | Description | |
|---|---|---|---|
Label*
| String | Specify a unique name for the Snap.
Default Value: RabbitMQ Consumer | |
Exchange
| String/Expression | Specify the name of the RabbitMQ exchange bound to the queue. If you do not specify a value for exchange, the default exchange provided by RabbitMQ is considered. Condition: Either Exchange or Queue has to be specified. Default Value: N/A | |
Exchange type
| Dropdown list | The type of RabbitMQ exchange used to push messages. Available options are:
Default Value: direct | |
Durable Exchange
| Checkbox | Select this checkbox to enable the exchange to be durable. Default State: Selected | |
Queue
| String/Expression | Conditional. Specify the name of the RabbitMQ queue from which messages have to be consumed. If there is no queue with the given queue name on RabbitMQ, then a new queue is created, and the consumer starts listening. If the exchange name and routing key are specified, the queue is bound to the exchange with that routing key. Either Exchange or Queue has to be specified. Default Value: N/A | |
Auto delete
| Checkbox | Select this check box to indicate that the RabbitMQ autoDelete property associated with the existing queue is set to
Default Value: Deselected | |
Routing Key
| String/Expression | Specify the routing key to be used for binding the queue with the exchange. Default Value: N/A | |
Processing Mode
| Dropdown list | Select one of the following modes for processing messages: Synchronous: In synchronous mode, the consumer processes messages from the destination one at a time until a STOP is read or the Message Count is reached. Asynchronous: In asynchronous mode, the consumer reads the messages from the destination whenever the message arrives until a 'STOP' is read or the Message Count is reached. The consumer registers a messagelistener asynchronously. It does not block, but calls (the processmessage) immediately once a message is available. If a message is not available, the consumer will retry for an available message at an interval of every 3 secs until the Message count is reached. For example, if the Queue sends 8 messages, and the Message count is set to 10, the consumer processes the 8 messages one after the other, and sleeps for every 3 seconds for the remaining two unavailable messages. Default Value: Synchronous
| |
Message Acknowledge Mode*
| Dropdown list | Select one of the following modes of message acknowledgement for non-transacted sessions:
Default Value: AUTO_ACKNOWLEDGE Select the PIPELINE_CONTROL option when using the RabbitMQ Acknowledge Snap in a Pipeline.
If you select the PIPELINE_CONTROL option and the message is not acknowledged, by default, the Consumer Snap waits for 30 minutes to get the acknowledgment. If Snap does not get any acknowledgment for the message even after 30 minutes, Snap considers the status as unacknowledged and moves to the next message. | |
Acknowledge type
| Dropdown list | Appears on selecting Auto_Acknowledgment from the Message Acknowledge Mode dropdown list. Select one of the following acknowledge types for the message.
Default value: Acknowledge Message | |
x-match
| Dropdown list | Specify the x-match value to be submitted for binding. The available options are:
Select x-match only when the Exchange type is header Default Value: all | |
Header properties
| Use this fieldset to define header properties to bind the queue with an exchange as arguments. Configure Header properties only when the Exchange type is headers. | ||
Header key
| String/Expression | Specify the name of the header that is being used for the binding. Default Value: N/A | |
Header value
| String/Expression | Specify the header value for the corresponding header key. Default Value: N/A | |
Argument properties | Use this field set to define custom argument properties to ensure all declarations for the queues use the same configuration/options/arguments. | ||
| Argument key
| String/Expression | Specify the name of the argument used for declaration. Learn more about Optional Arguments in RabbitMQ documentation. Default value: N/A |
Argument value
| String/Expression | Specify the value corresponding to the argument key. To consume messages from the quorum queue, specify the Argument key as x-queue-type and the Argument value as quorum. Default value: N/A | |
Message Count
| Integer/Expression | Controls the number of messages to be consumed from the destination queue before the consumer is stopped. A negative integer value, that is, the default value of -1, causes the consumer to run indefinitely.
Default value: -1 When you validate the Snap, the Snap consumes only one message irrespective of the message count. | |
Maximum connection attempts
| Integer | Specify the maximum number of connection attempts in case of a connection failure. The Snap retries for the configured number of attempts for establishing the connection. Default Value: 3 | |
Connection retry interval
| Integer | Specify the time taken in seconds to wait before retrying for another connection. Default Value: 10 | |
Execution timeout (seconds) | Integer | Specify the maximum wait time, in seconds, for the Snap to complete execution. If the specified time is exceeded, the Snap stops processing. The default value 0 indicates no timeout. | |
Snap Execution
| Dropdown list | Indicates how the Snap must be executed. Available options are:
Default Value: Validate & Execute | |
Examples
Snap Pack History