Azure ServicesLast Updated: 10/18/2018 Introduced in Version:
Azure Services is a messaging system that can be installed as a module allowing Decisions to integrate application to application communication. Azure Services Queue settings are available and can be configured after install. For more information on Decisions messaging services see attached link: https://documentation.decisions.com/setting-messaging-overview/.
Note: The Azure messaging module has been renamed from Azure Service Bus to Azure Services. The Azure Service Bus module has been removed from the Decisions platform. Please Install Azure Services to integrate with Azure.
Install Azure Services by navigating to the designer folders and locate System>Administration>Features to open up Decisions available features. Locate the Azure Services module and select Install. After install, restart the Service Host Manager to complete the process. For information about restarting a server see the attached link: https://documentation.decisions.com/changing-server-settings-settings-xml/.
Once you install the module, setting up an Azure Queue is now available in Decisions when you navigate to Systems> Jobs and Events> Message Queues. After you select Add Azure Queue either from the menu as seen in the image below or using the blue action bar at the bottom of the page a form will appear allowing you to specify the queue settings.
In the designer folder locate System>Jobs and Events>Message Queues, choose Add Azure Queue from the blue action bar.
After selecting Add Azure Queue, the display form allows you to Name the Queue.
- Display Name: The name that will appear in Decisions.
- Queue Name: The name of the queue on the message server.
- Custom Connection String: A string that tells Decisions where and how to connect to the Azure message bus server. This can be obtained from the Azure configuration console.
Enter the Display Name, Queue Name, Custom Connection string and Save.
After entering the Display Name, Queue Name and Custom Connection String, the Azure Message Queue is now save in the designer view.
Right click on the message queue and select from the listed settings. This list of selections gives you the ability to delete, edit, add, control, import/export and manage your queue.
Select Control and a different Queue options are displayed.
Resync Queues: Recreates the message queues if necessary and re-synchronizes with the message server.
Start Queues: Starts processing messages on the message queues (if stopped).
Stop Queues: Stops processing messages on the message queues. The message server will hold any unprocessed messages.
Test Queues: Reads the number of waiting messages on the queue and shows a pop up with the amount of waiting messages. An easy way to verify connectivity to a queue.
ADD A MESSAGE HANDLER:
- Handler Name –The name of this handler to display in Decisions.
- Message Handling – do you lease the message (lock), lease the message temporarily (lock with auto timeout), remove it after processing (pop), or use it but leave it on queue (peek).
- Active Flow Count – Maximum number of simultaneous messages that Decisions will process.
- Handler Flow –The flow used to process messages that appear in the queue. This is the flow we created above.
- Message Queue – The queue for the handler to listen on, that was configured in system settings.
Get: Reads messages from the Message Server and tells the Message Server that they’ve been handled. The Message Server removes them from its message queue. This mode instructs the relevant message server or third party client to pull messages off of the Message Server as fast as possible and keep them in an in-memory list for Decisions to pull from.
Lease: Reads messages from the Message Server and tells the Message Server that they are being processed, this is used when every message must be handled. The Message Server keeps them in the queue, marking them as “leased” by a client (that is, Decisions), and does not deliver them to any other client that requests messages from the queue. When Decisions finishes handling the message by running the handler flow, it tells the Message Server that the message has been handled and the Message Server marks it for deletion. If Decisions doesn’t do this (for example, if the handler flow encountered an error), then the lease on that message will eventually time out and the Message Server will mark it as deliverable to another client.
Note: Lease Mode is is slightly slower than “Get” modes, but doesn’t have the problem where messages can be lost in memory prior to being processed if the Decisions server shuts down or gets rebooted.
Set up Message Handler and then select the Message Queue, navigate to the drop down menu. In the drop down menu select the message queue previously set up.
Message Handler Flow
When a Message Handler Flow is created, it will have “Message Queue Handler Flow” behavior. This gives it two special Inputs: a Handler Id identifying the Message Queue Handler that received the message, and Message, which contains information about the message that Decisions received from the message server. In the Message is the Payload field, which contains the raw data for the message contents.
Building a Message Handler Flow will require different steps depending on the contents of the message that is being formatted. Each format whether it be a simple text, XML or JSON have different steps that extract the contents of the message. After choosing the correct step for the message, build the flow to react to the contents.