Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

...

Snap type:

Write

...

Description:

...

Overview

You can use this Snap to write messages from incoming binary document stream to

...

a RabbitMQ destination queue.

...

...

Snap Type

RabbitMQ Producer Snap is a Write-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

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Binary

 

 

  • Min:1

  • Max:1

  • CSV Formatter

  • JSON Formatter

  • XML Formatter

  • File Reader

Any binary data stream where the binary data is published to the RabbitMQ destination queue.

Output

Document

  • Min:0

  • Max:1

  • Downstream Snap is optional. Any Snap with a document input view can be connected downstream.

...

The output view for this Snap is optional.

...

It provides a document with information on the message's status

...

.

...

  • Access to the RabbitMQ Server.
  • Privileges to perform various actions on the Queues such as receive and send messages.

...

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.

...

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

...

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

Info
  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star) ): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( (blue star) ): Indicates that you can add fields in the fieldset.

  • Remove icon ( (blue star)): Indicates that you can remove fields from the fieldset.

Field

Field Type

Description

Label

String

Required. Specify a unique 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

...

Default value: RabbitMQ Producer
Example: RabbitMQ Producer

Exchange

String/Expression

Specify the name of the RabbitMQ exchange used to

...

publish messages. If

...

you do not specify an exchange, the RabbitMQ server's default

...

exchange is used.

Default value: N/A
Example: Exchange1

Exchange type

...

Dropdown list

Choose the 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

Default value: direct
Example: fanout

Durable exchange

...

Checkbox

Select this checkbox to indicate the durability of the exchange

...

.

Default state: Selected

Queue

...

String/Expression

Specify the name of the RabbitMQ queue to which messages have to be pushed. If the queue with the specified name is not

...

existing on the RabbitMQ server,

...

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 completes and deletes it as soon as the session expires.  
If the Routing key is specified,

...

the queue is bound to the exchange with the specified routing key, and only

...

messages with the specified routing key are pushed to the queue.

ExampleQueue1

Default value: N/A
Example: Queue1

Create dynamic queue

...

Checkbox

Select this checkbox to generate 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

...

state:

...

 Selected

Auto delete

Checkbox

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

Default

...

state: Deselected.

Routing Key

...

String/Expression

Optional. The routing key will be used to bound the queue with the exchange. Supply the Routing key

...

when the Exchange type is direct and topic to route the message to queues.

Note

...

The routing key is mandatory

...

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

"<error message>"

x-match

...

Dropdown list

Specify 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

Note

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

Wait for confirms timeout (ms)

Integer

...

Specify 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

...

acknowledgment from the broker(Queue) for the published message until the given time, a timeout exception will be recorded.

Default value: 0
Example: 5

Header Properties

...

Specify the header properties that will be used to bind the queue with an exchange as arguments.

...

This fieldset comprises the following fields:

 This fieldset comprises the following fields:

  • Header key

  • Header value 

Note

Configure Header properties only when the Exchange type is headers.

Only one header property can be specified in each row. Click Image Removed to add a new row in this table and specify the values accordingly.

Header key

...

Header key

...

String/Expression

Speciy the name of the header that is being used for the binding.

Header value

String/Expression

...

Specify 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 Image Removed to add a new row in this table and specify the values accordingly.

...

 This fieldset comprises the following fields:

  • Key

  • Value 

...

Key

String/Expression

Specify the name of 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

Learn more.

Value

String/Expression

Specify the value for the message property.

Argument properties

...

Specify the custom argument properties to ensure all declarations for the queues use the same configuration/options/arguments

...

.

...

This fieldset comprises the following fields:

  • Argument key

...

  • Argument value 

...

           Argument key

...

String/Expression

Specify the name of the argument used for declaration.

...

...

 in RabbitMQ documentation for more information.

Default value: N/A
Example: x-max-len-bytes, x-max-priority,

...

 x-queue-type

Default value: None.

         

...

 Argument value

String/Expression

Specifies the value corresponding to

...

the argument key.

Info

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

Default value: N/A
Example: 1048576, 2, quorum

...

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

...

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.

...

to establish the connection.

Default value: 3
Example: 5

Connection retry interval

Integer

...

Specify the time taken in seconds to wait before retrying for another connection.

Default value: 10
Example: 5

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Dropdown list

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Examples

...

Expand
title

...

...

RabbitMQ Producer

...

 Image Removed

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:

 Image Removed

The Route connection errors property is selected and hence the unprocessed messages with details are sent to the error view along with the original.

Image Removed

If the Route connections errors property is disabled, the Snap fails to execute: 

Image Removed 

...

titleRabbitMQ Producer Snap with retry attempts

In this pipeline, there are ten messages sent to the RabbitMQ Producer Snap. 

Image Removed

The Sequence and the Constant Snaps set to pass the messages to the Queue respectively.

Image Removed Image Removed

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:

Image Removed 

...

sending messages to the selected Exchange

In this pipeline, the RabbitMQ Producer Snap produces the messages and submits them to the RabbitMQ server.

...

Image Added

The RabbitMQ Producer Snap

...

produces the messages and

...

submits 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,and x-match 

...

before it starts producing and submitting the messages to the server.

...

Successful execution of the pipeline displays the message properties in the output preview:

...

Image Added

  

Snap Pack History

Insert excerpt
RabbitMQ Snap Pack
RabbitMQ Snap Pack
nopaneltrue