Creating message queues
Message queues allow different parts of your application to communicate and perform activities asynchronously. To create a message via the Designer, you need to navigate the Message queues view and either select + or New queue.
To create a new message queue via the Designer:
- Select New queue
- In the queue name, provide a name to your new message queue and select the queue group. Next, select the routed service called when a message is sent to this queue. Finally, enable/disable the message queue to accept and process incoming messages.
- Select Create
Submitting a message to the queue
After creating your message queue and its associated service, you can submit messages to the queue for processing from your endpoint or task services. To submit a message to your queue, you need to use the "Submit Message to Queue" node in your service flow designs.
There is no defined set of input parameters for the "Submit Message to Queue" node. The number of input parameters needed is determined by your message queue handling service. You need to connect all required data objects as input to this node and map them to the input parameters of your messaging service.
As an example below, we have defined a messaging queue called "Send Invoice" which has a routed service that emails the sales order invoice to its customer. In this example, the messaging service requires three input parameters, a customer, a salesOrder and an invoice object. We use these objects to send the right invoice file as an attachment for the associated sales order of the specified customer.
To submit a message to this message queue for processing and eventually sending the sales order invoice, we have used the "Submit Message to Queue" node in another endpoint service where we processed the sales order.