- 04 Aug 2022
- 4 Minutes to read
-
Print
-
DarkLight
About RabbitMQ Message Services
- Updated on 04 Aug 2022
- 4 Minutes to read
-
Print
-
DarkLight
Overview
The Message Queue architecture allows a designed system to handle large client requests by placing them into a queue to process asynchronously. Message Queues can be placed between an application server and a database server. This setup lets the application server send a response to the requesting user and place the request in the Message Queue. The database server can then pick up the request from the Message Queue and process that transaction.
The Rabbit Message Queue (RabbitMQ) is a messaging system for application-to-application communication. The RabbitMQ module adds the capability to the Decisions Messaging Service, which lets users connect to built-in Flow steps to manage a Rabbit MQ. The RabbitMQ module allows users to queue subscribers so that the Flow can work and push messages to Queues using Flow steps. Users can also integrate with RabbitMQ, take in a message, and then convert the message to any type of data for processing.
Prerequisites
- Active RabbitMQ application
- Installation of the RabbitMQ Module in Decisions. To learn how to install a module, see Installing Modules.
- Setting Up Messaging Overview
Configuration
- Navigate to Systems > Jobs and Events. Right-click Message Queues and select Add Rabbit Queue.
- On the Add Rabbit Queue dialog window, enter a Display Name and the Queue Name. Configure any other options necessary and click SAVE.
Configuration Options Description DEFINITION Display Name Determines how the Queue's name displays. Queue Name The name of the Queue that the system references. Is Durable Queue When Decisions create the Queue, this setting keeps the Message permanently. If no one is using the Queue, this setting will reclaim the Message Queue and recreate the Message. Auto Delete Instructs the Message Server to delete the Queue when its last consumer disconnects. Override Server Info Allows the specific server to be set up. This includes the Server IP or Name as well as the Port number. Override Virtual Host Allows the ability to set up multiple virtual hosts allowing the user to host Decisions. The Virtual host runs in order to keep the actual production from interference. Server IP or Name Specify the IP address or server name Use Default Port Allows the user to enable using the default port Use SSL Enables use of SSL Override Queue Credentials Provides the ability to set up a username and password that can be assigned, allowing specific credentials to be required QUEUE ARGUMENTS Queue Type Specifies the queue type (classic, quorum) Dead Letter Exchange The queue for undelivered or failed messages Dead Letter Routing Key Routing key for dead letter Maximum Queue Length Sets the maximum queue length Message TTL (msec) Sets the message time-to-live in milliseconds - Navigate to System > Jobs and Events > Message Queues. Right-click on the Message Queue and select Control. Select Test Queue to verify the connection with RabbitMQ. If successful, a dialog popup screen will appear displaying the test result.
Configuration Options Description Disable Queue Disables the queue Resync Queue Recreates the Message Queues if necessary and re-synchronizes with the Message Server Start Queue Starts processing Messages on the Message Queues (if stopped) Stop Queue Stops processing Messages on the Message Queues. The Message Server will hold any unprocessed messages. Test Queue Reads the number of awaiting Messages on the Queue and shows a pop-up with the amount of awaiting Messages - Navigate to System > Jobs and Events > Message Queue Handlers. Click ADD MESSAGE HANDLER.
Configuration Options Description Handler Name Name to display in Decisions Message Handling Sets the Message Handling mode to lease the message (lock), lease the message temporarily (lock with auto timeout), remove it after processing (pop), or use it but leave it on the Queue (peek) Lease Temporarily pulls the message from the queue; The message cannot be pulled while it is leased but will remain in the queue. If the message fails, the lease is removed and made available in the queue. If the message passes, it is removed from the queue. Slightly slower than Get and Remove. Lease w/ Expire The lease times out, and the message becomes deliverable again in one of two scenarios: the message handler's flow throws an exception. Decisions sends the message server a NAck (not acknowledged) signal for that message, or the communications channel between Decisions and the message server is broken. Get Messages will be pulled from the queue but NOT REMOVED, and the Handler Flow will run. It will not check to see if the Handler Flow failed. Due to Get not removing messages, messages will continue to be read repeatedly until something else removes the message. Get and Remove Messages will be pulled and removed from the queue, and the Handler Flow will run. It will not check to see if the Handler Flow failed. Messages will not be stored in memory if the server shuts down, resulting in data loss. This is quicker than Lease or Lease w/ Expire. Active Flow Count The maximum number of simultaneous Messages that Decisions will process. PICK HANDLER FLOW This Flow is used to process Messages that appear in the Queue. Message Queue The Queue for the Handler to listen to. This is configured in System > Jobs and Events > Message Queues. If setting the Message Handler mode to Get or Get and Remove mode, Decisions will auto-ACK every message. If using Lease or Lease w/Expire mode, Decisions will only ACK if the handler's Flow completes successfully. If the Flow throws an exception, Decisions will send a negative ACK (NACK).