RabbitMQ Producer

On this Page

Snap type:

Write


Description:

This Snap writes messages from incoming binary document to a RabbitMQ destination queue.
  • Expected upstream Snaps: Any Snap with a binary output view can be connected upstream, e.g. CSV Formatter, JSON Formatter, XML Formatter, File Reader, etc.
  • Expected downstream Snaps: Downstream Snap is optional. Any Snap with a document input view can be connected downstream.
  • Expected input: Any binary data stream.
  • Expected output: The output view for this Snap is optional. The output view provides a document with information on the status of the message.


Prerequisites:
  • Access to the RabbitMQ Server.
  • Privileges to perform various actions on the Queues such as receive and send messages.
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:
InputThis Snap has exactly one binary input view where it gets the binary data as a message to be written to the RabbitMQ destination queue.
OutputThis Snap has at most one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

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 typeThe type of RabbitMQ exchange used to route the messages to the respective queues. Options available include:
  • direct: routes messages to queues based on the Routing Key
  • fanout: copies and routes a received message to all queues that are bound to it regardless of routing keys or pattern matching
  • headers: routes the messages based on arguments containing headers and optional values
  • topic: routes messages to queues based on matches between the Routing key and Queue
Durable exchangeWhether 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.  
If the Routing key is specified, then the queue is bound to the exchange with specified routing key and only the messages with specified routing key are pushed to the queue.

ExampleQueue1

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:

  • Queue name provided- the Snap publishes the messages in the specified exchange.
  • Queue name not provided- the Snap publishes the messages in the queue of the default exchange and stores the messages on the queue of that exchange type..

Default value: Selected

Auto delete

Select this check box to indicate that the RabbitMQ autoDelete property associated with the existing queue is set to true.

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.

Routing key is mandatory is direct or topic exchange type is selected. Messages will not be routed otherwise and the following error will be displayed:

"<error message>"

x-match


Specifies the x-match value to be submitted for binding. The available options are:

  • any : If selected, even one matching header value is sufficient
  • all : If selected, mandates that all the values should match

Default value: all

Select x-match only when the Exchange type is headers.

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.  

Configure Header properties only when the Exchange type is headers.

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
  • Header value 


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
  • Value 
           KeySpecifies the name for the message property. The message properties that can be added are:
  • content-type
  • delivery-mode: 1 (non-persistent), 2 (persistent)
  • expiration
  • priority
  • correlation-ID
  • redelivered

Refer this link for the additional information:
https://www.rabbitmq.com/amqp-0-9-1-reference.html#class.basic

           ValueSpecifies 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
  • Argument value 
           Argument key

Specifies the name of the argument used for declaration. See Optional Arguments in RabbitMQ documentation for more information.

Example: x-max-len-bytes, x-max-priority, x-queue-type

Default value: None.

           Argument value

Specifies the value corresponding to the argument key.

To publish messages to the quorum queue, specify Argument key as x-queue-type and Argument value as quorum.


Example: 1048576, 2, quorum

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

Route connection errors

Select this checkbox to route the connection errors to the error view displaying the error information along with the original input. If the RabbitMQ connection fails or the Snap fails to publish the messages, the documents that have not been processed yet will be routed to the error view.

When you deselect the checkbox, the Snap fails to execute. If the RabbitMQ connection fails or the Snap fails to publish the messages, the Snap displays an exception and the pipeline execution stops.


Default value: Deselected

Snap execution


Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Examples


 RabbitMQ Producer Snap with messages routing to the error view

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 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: 

 

 RabbitMQ Producer Snap with retry attempts

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:

 


 RabbitMQ Producer sending messages to the selected Exchange

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 keyHeaderproperties, 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


 Click to view/expand
Release Snap Pack VersionDateType  Updates
August 2024main27765 StableUpdated and certified against the current SnapLogic Platform release.
May 2024437patches27616 Latest

Fixed the following issues with the RabbitMQ Producer Snap:

  • With no access to the virtual hosts, the Snap displayed a null pointer exception.

  • The Snap did not display the original payload when the error view was enabled.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main23721 StableUpdated and certified against the current SnapLogic Platform release.

August 2023

main22460

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022main18944 StableUpgraded with the latest SnapLogic Platform release.
September 2022430patches18079 Latest

The RabbitMQ Consumer and RabbitMQ Producer Snaps now display an informative error message when you do not provide the Queue type attribute in the Quorum queue or provide conflicting Queue types for Classic and Quorum queues.

August 2022430patches17462 LatestThe RabbitMQ Account now successfully validates even when the port is out of range.
August 2022main17386 Stable

The RabbitMQ Consumer and RabbitMQ Producer Snaps can consume and produce messages respectively from the quorum queue by setting the Argument key field as x-queue-type and Argument value as quorum to consume or publish messages from/to the quorum queue.

4.30main17386 StableUpgraded with the latest SnapLogic Platform release.
4.29 Patch429patches17049 Latest

Enhanced the RabbitMQ Consumer Snap with:

  • Acknowledgment Type the dropdown list that allows you to set the acknowledgment type, which is available only when you select Auto_Acknowledgement in the Message Acknowledge Mode field.

  • A default 30-minute acknowledgment timeout—the Snap waits only for 30 minutes to get an acknowledgment. When there is no acknowledgment even after 30 minutes, Snap considers the status as unacknowledged and moves to the subsequent message.

4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28main14627 StableUpgraded with the latest SnapLogic Platform release.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.
4.26 Patch426patches11770LatestEnhanced the Rabbit MQ Account with a new checkbox Cluster Support that enables multiple cluster node support for RabbitMQ Consumer and RabbitMQ Producer Snaps. You can select this checkbox to enable high availability of clusters by adding multiple hosts (Host name and Port) for each cluster node.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25main9554
 
StableUpgraded with the latest SnapLogic Platform release.
4.24 Patch 424 patches8750 Latest

Fixed the handling of RabbitMQ Headers in the RabbitMQ Consumer Snap, including the x-death header.

4.24main8556
StableUpgraded with the latest SnapLogic Platform release.
4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.
4.22main6403
 
Stable

Enhances the RabbitMQ Consumer and RabbitMQ Producer Snaps to allow defining custom arguments to ensure that all declarations for the queues use the same configuration/options/arguments. 

4.21snapsmrc542

 

StableUpgraded with the latest SnapLogic Platform release.
4.20snapsmrc535
 
StableUpgraded with the latest SnapLogic Platform release.
4.19snaprsmrc528
 
Stable

Added the Auto delete check box, which enables you to indicate that the RabbitMQ autoDelete property associated with the existing queue is set totrue.

4.18 Patch rabbitmq8058 Latest

Fixed an issue with RabbitMQ Snaps wherein the Snaps throw an error when the auto-delete setting is set to true.

4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16snapsmrc508
 
StableUpgraded with the latest SnapLogic Platform release.
4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490
 
StableUpgraded with the latest SnapLogic Platform release.
4.13 Patch rabbitmq5296 Latest

Fixed the RabbitMQ Acknowledge Snap that returns a NullPointerException error when no DeliveryTag is sent during pipeline execution. 

4.13

snapsmrc486

 
Stable
  • Added a new Snap, the RabbitMQ Acknowledge Snap to perform an acknowledge, reject or a recover action on the received message from the RabbitMQ server.
  • Added a new property “Message Acknowledge Mode” in the RabbitMQ Consumer Snap to specify the mode of message acknowledgement -- Auto Acknowledge or Pipeline Control (if the RabbitMQ Acknowledge Snap is used).
4.12

snapsmrc480

 
Stable
  • Added a new RabbitMQ Producer Snap setting to customize the wait-for-confirms timeout window.
  • Fixed an issue that prevented a clean connection recovery in the RabbitMQ Producer when a previous connection attempt failed and exhausted the retry attempts.
4.11 Patch rabbitmq4653 

Fixed an issue with the RabbitMQ Retry Mechanism that fails to process after failure.

4.11 Patch rabbitmq4613 

Added the RabbitMQ Producer Snap with property 'Wait for confirms timeout (ms)' to enable the user to configure the publish timeout in milliseconds.

4.11 Patch rabbitmq4535 

Enhanced the RabbitMQ Producer and Consumer for connection retry logic when running in Ultra Pipelines.

4.11 Patch  rabbitmq4465 

Fixed an issue with the RabbitMQ Producer where dynamic queues were created for each instance of an Ultra Pipeline. The property Create dynamic queue is added as a part of the fix.

4.11 Patch rabbitmq4423 

Fixed an issue with the RabbitMQ Producer Snap that now creates dynamic queue for each message received.

4.11 Patch rabbitmq4324 

Fixed the following issues:

  • The RabbitMQ Snap, which failed, throwing a connection timeout error instead of trying to reconnect.
  • Issue with the Consumer Snap errors not going through error view.
  • Ultra Task Snap loaded the same document onto the RabbitMQ queue five times.
  • Ultra Task Snap, on an error logic retry, loaded the same document onto the RabbitMQ Producer Snap.
  • Inability to specify input variable for Routing key.
4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.

4.10 Patch 

rabbitmq4094

 

Fixed an issue related to messages being processed multiple times under certain failure conditions with Ultra pipelines. Added additional timeout conditions to the retry/error view handling.

4.10 Patch 

rabbitmq3860

 

Fixed an issue in Retrying.The configuration for retrying can be provided in Producer and Consumer Snaps individually.

4.10

snapsmrc414

 
Stable
  • The Message count property updated to a default value of -1.
  • Added the Producer Snap with Retry request interval and Maximum request attempts fields to support the retry logic in case of a network failure.
  • Added support to the RabbitMQ Account with the Use TLSv1.2,Trust all certificates, Key Store, TrustStore, Key/Truststore password and Key alias properties to support the SSL/TLS for secured communications.
4.9snapsmrc405
 
StableUpgraded with the latest SnapLogic Platform release.
4.8 Patch rabbitmq2731 Latest
  • Provided the Enhance Exchange Header support for RabbitMQ Snap Pack.
  • x-match and Header properties added to support different exchange headers. 
4.8 Patch rabbitmq2720 Latest
  • Addressed the following issues:
    • RabbitMQ Snap Pack - Thrown by RESTEasy when HTTP Not Acceptable (406) is encountered.
    • Unable to configure RabbitMQ - Producer to work with existing Topic Exchange
    • Exchange type and Durable Exchange added to support different exchange types. 
4.8

snapsmrc398

 
Stable

Info tab added to accounts.

4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6snapsmrc362
 
StableUpgraded with the latest SnapLogic Platform release.
4.5.1

snapsmrc344

 
Stable

Resolved an issue with the Producer and Consumer Snaps not releasing connections.

4.4.1
 Stable

NEW! This Snap Pack contains a Consumer and a Producer Snap.