Send RabbitMQ Message

Use this step to send message using RabbitMQ.

Last published at: August 2nd, 2023

clsSendRabbitMQMessage Step

Description:

This step sends messages using the RabbitMQ queue (open-source message broker software).

 

Inputs

  • RabbitMQ – select RabbitMQ connection
  • messageData – message content to be sent
  • exchange – name of the exchange
  • messageQueue – name of the queue
  • routingKey – optional routing key
  • messageParms – message parameters key=value pairs
 

 

Returns

  • True – email sent successfully
  • False – failed to send the email
 

      

Usage:

 

 

Before using this step in a process definition, configure a RabbitMQ connection using the following UI:

 

RabbitMQ is a widely used Enterprise service bus; you can get more information from their site at: https://www.rabbitmq.com/

Example:

Let’s build and execute the “clsSendRabbitMQMessageDef” example.                

  • Create a new process definition called “clsSendRabbitMQMessageDef”
  • Select the definition and click the “design” button
  • Drag a "clsSendRabbitMQMessage" step to the canvas
  • Connect the dots between the start and "clsSendRabbitMQMessage" step
  • Click the "clsSendRabbitMQMessage" step to configure its “Settings” properties. Provide a name to the step. Select the RabbitMQ connection from the dropdown list. Provide a text message to send. Provide the exchange name. 

 

  • Click on the "clsSendRabbitMQMessage" step to configure its “Advanced” properties. Provide the message queue and routing key. Click on the button to configure the message parameters. 

 

  • Click on the button to configure the message parameters. Click on “Add Row” to provide the key and value information. Click on “Save” to confirm the changes. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new process instance, and execute. Render the process instance. Click on the process step. The step should publish/send messages to the RabbitMQ service.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.

Click here to download the sample file.