Queue triggers enable triggering Processes on messages received from an AMQP 1.0 queue. The queue trigger consumes the message from the queue whenever there is a new message available in the queue. The contents of the consumed message are then available in the process for further processing.

Configuring Queue Triggers

The queue trigger offers the following configuration properties to connect to a specified queue.

  • Queue - The name of the AMQP queue which to listen to

  • Bus Uri  - The URIfor the AMQP Bus, e.g. amqps://owner:@.servicebus.windows.net:5671

  • Reply - Should we send the succeeding process result to the Queue specified by the ReplyTo option 

  • Reply Errors  - Should we send failing process result to to the Queue specified by the Reply To option

  • Reply To - The queue where we should send the replies to

  • Queue is durable - If set, the queue is expected to be durable, i.e. it will survive possible broker restarts.
    This setting needs to match the actual configuration of the queue, if it has been created beforehand.
    Please note that this setting is only recognized by FRENDS Agents in version 5.2.4 and above.

Trigger Reference List

Receiving messages

The Queue trigger receives and accepts(completes) messages from the queue as they arrive with the limit of 10 concurrent messages being processed per Queue trigger per Agent. If configured to do so, the trigger will send a reply message to the 'Reply To' queue when the process finishes.

Note: The AMQP body may contain different types of data. Most of the time this provided as is to the process, the exception being when the body is a byte array and the property 'ContentType' has the 'Charset' field set, e.g. 'text/plain; charset=UTF-8'. In this case the binary data is converted to a string with the encoding matching the charset.

Reply messages

If the Process failed and Reply Errors was selected, the exception that caused the failure will be written to the reply message. The message will have a new Guid as the MessageId and the same CorrelationId as the original trigger message.

When replying a success to a queue, the result is is written as the body of the message. Complex structures(objects) are serialized by default as JSON. In this case the Correlation Id of the triggering message is copied to the reply message.

It is possible to define the message structure directly in the result. This is done when the result contains an object which has at least either of the properties Body or ApplicationProperties. In this case the result object is mapped directly as the reply message with the following structure:

Body: object - the body of the reply message
ApplicationProperties: Dictionary<string, object> - the custom headers for the message
Properties - the AMQP message properties
MessageId; string
AbsoluteExpiryTime: DateTime
ContentEncoding: string
ContentType: string
CorrelationId: string
CreationTime: DateTime
GroupId: string
GroupSequence: uint
ReplyToGroupId: string
ReplyTo: string
Subject: string
UserId: byte[]
To: string





Did this answer your question?