On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Write | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap writes messages from incoming binary document to a RabbitMQ destination queue.
| ||||||||||||||
Prerequisites: |
| ||||||||||||||
Support and limitations: | Works in Ultra Pipelines. | ||||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring RabbitMQ Accounts for information on setting up this type of account. | ||||||||||||||
Views: |
| ||||||||||||||
Settings | |||||||||||||||
Label | Required.The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||||||||||||||
Exchange | Name of the RabbitMQ exchange used to push messages. If no exchange is specified, then RabbitMQ server's default exhange is used. Example: Exchange1 | ||||||||||||||
Exchange type | The type of RabbitMQ exchange used to route the messages to the respective queues. Options available include:
| ||||||||||||||
Durable exchange | Whether or not the exchange is durable. | ||||||||||||||
Queue | Name of the RabbitMQ queue to which messages have to be pushed. If the queue with specified name is not present on the RabbitMQ server, then a new queue is created and is bound to the exchange. If there is no Queue name available, the Snap creates a temporary Queue name and uses it until the execution and deletes as soon as the session expires. Example: Queue1 Default value: None | ||||||||||||||
Create dynamic queue | If enabled the Snap generates a dynamic queue when the queue name is not provided. The Snap publishes the messages on the default (or specified) exchange and stores the messages in the dynamic queue until the session expires and the dynamic queue thus generated is deleted soon after. When the dynamic queue is not selected with:
Default value: Selected | ||||||||||||||
Auto delete | Select this check box to indicate that the RabbitMQ autoDelete property associated with the existing queue is set to Default value: Deselected. | ||||||||||||||
Routing Key | Conditional. Routing key to be used for binding the queue with the exchange. Supply the Routing key, when the Exchange type is direct and topic to route the message to queues.
| ||||||||||||||
x-match | Specifies the x-match value to be submitted for binding. The available options are:
Default value: all
| ||||||||||||||
Wait for confirms timeout (ms) | Specifies the timeout in milliseconds. The Snap waits until the message published since the last call has been acknowledged or not by the broker or, until the given timeout elapses. For example, If the time set is 1000 ms, if the Snap does not get the acknowledgement from the broker(Queue) for the published message until the given time, a timeout exception will be recorded. Default value: 0 | ||||||||||||||
Header Properties | Specifies the header properties that will be used to bind the queue with an exchange as arguments.
Only one header property can be specified in each row. Click to add a new row in this table and specify the values accordingly.This fieldset comprises the following fields:
| ||||||||||||||
Header key | Specifies the name of the header that is being used for the binding. | ||||||||||||||
Header value | Specifies the header value corresponding to the respective header key. | ||||||||||||||
Message Properties | Specifies the properties to be set in RabbitMQ messages. Only one property can be specified in each row. Click to add a new row in this table and specify the values accordingly.This fieldset comprises the following fields:
| ||||||||||||||
Key | Specifies the name for the message property. The message properties that can be added are:
Refer this link for the additional information: | ||||||||||||||
Value | Specifies the value for the message property. | ||||||||||||||
Argument properties | Specifies the custom argument properties to ensure all declarations for the queues use the same configuration/options/arguments. Only one argument can be specified in each row. Click to add a new row in this table and specify the values accordingly.This fieldset comprises the following fields:
| ||||||||||||||
Argument key | Specifies the name of the argument used for declaration. See Optional Arguments in RabbitMQ documentation for more information. Example: Default value: None. | ||||||||||||||
Argument value | Specifies the value corresponding to the argument key.
Example: Default value: None. | ||||||||||||||
Maximum connection attempts | 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. If it exceeds the configured value, and the Route connection errors property is enabled, the messages are routed to the error view with the error information along with the original. When the Route connection errors property is disabled, the Snap displays the number of published messages along with the error information, however, the Snap fails. Default value: 3 | ||||||||||||||
Connection retry interval | The time taken in seconds to wait before retrying for another connection. Default value: 10 | ||||||||||||||
|
|
Examples
Expand | ||
---|---|---|
| ||
In the below pipeline, the messages are created and sent to the RabbitMQ Producer Snap. The valid messages are sent to the output view and the invalid messages are sent to the error view. In case of a server shut down or an unplugged network, the messages are routed to the error view. Note the Script Snap is used to create a delay of 5 secs between each message.
The Maximum connection attempts is set to a default 3, which means the Snap attempts three times before publishing the messages. If it exceeds the configured value, the Snap fails to execute.
The The output preview from the successful execution of the pipeline:
The Route connection errors property is selected and hence the unprocessed messages with details are sent to the error view along with the original. If the Route connections errors property is disabled, the Snap fails to execute:
|
Expand | ||
---|---|---|
| ||
In this pipeline, there are ten messages sent to the RabbitMQ Producer Snap. The Sequence and the Constant Snaps set to pass the messages to the Queue respectively.
In the RabbitMQ Producer Snap, the messages are produced from the Queue1 of Exchange1. The Maximum requests attempts has been set to 3 and the the Retry request interval has been configured to 180 seconds. This means, the Snap attempts three times to get the messages from the queue with a retry interval of 180 seconds (in case of a network outage). The Successful execution of the pipeline displays the below output preview:
|
Expand | ||
---|---|---|
| ||
In this pipeline, the RabbitMQ Producer Snap produces the messages and submits them to the RabbitMQ server. The RabbitMQ Producer Snap, produces the messages and submit them to the selected exchange (as set in the properties) for routing to the designated queues depending upon the configured bindings. Note that the Producer creates the Exchange and Queue if they are not available in the RabitMQ server, and binds them based on the properties configured such as Routing key, Headerproperties, x-match etc., before it starts producing and submitting the messages to the server. Successful execution of the pipeline displays the message properties in the output preview: |
Snap Pack History
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|