AMQP Trigger
Running Processes in order using Message Queues.
In order to launch a Process through AMQP 1.0 messaging queues, AMQP Trigger, also known as Queue Trigger, can be used.
You can learn more about Triggers in general here.
What is AMQP Trigger?
AMQP Trigger or Queue Trigger listens for new messages in AMQP 1.0 message queues and activates Processes accordingly. Suitable for event-driven architectures where asynchronous communication is key.
Usage
To use a Trigger in your Process, add it to your Process canvas, and connect it to the beginning of your Process using a Sequence flow. If you are using multiple Triggers in your Process, all Triggers must connect to the same shape, which is also the first non-Trigger shape in your Process.
Once added to your Process, you can change the Trigger's type to match your requirement and give it a unique name. By default, the Trigger's type will provide a corresponding name for the Trigger. You can then configure the parameters for the chosen Trigger type.
For AMQP Trigger, you should set up a messaging queue beforehand, and then connect the Trigger to it through its bus URI as well as specify the queue to read messages from. You can also optionally set up default replies to a queue whenever a message is read and processed from the queue.
By creating a Process using AMQP Trigger and activating said Process, the Frends Agent will start listening for messages from the queue and trigger the Process as necessary to handle the messages.
Configuration
To set up an AMQP Trigger, add the shape to Process canvas and connect it as part of your Process. After that, you can select the Trigger type and configure the parameters for it.
The common parameters available for all Triggers are explained on the Trigger reference page. The following configuration parameters are available for AMQP Trigger.
Queue
Name of the queue to listen to for messages. Environment Variables can be used here to use different queues for each Environment.
Bus URI
Connection string or URI for the AMQP message bus.
Reply
Toggle switch to select whether or not an automatic reply is sent to a queue when a message is successfully processed from the queue. Reply contents will be the Process result for a successful execution.
Target queue for the replies is set in Default reply queue field.
Reply errors
Toggle switch to select whether or not an automatic reply is sent to a queue when the Process execution fails to handle a message. Reply contents will be the Process result for a failed execution.
Target queue for the replies is set in Default reply queue field.
Default reply queue
Text field to specify the queue replies are sent to. Environment Variables can be used here to use different queues for each Environment.
Queue is durable
Toggle switch to set if 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.
Do not log trigger parameters
Toggle option that when enabled, hides the Trigger parameters from being logged in Process Instances.
Reference Values
In addition to the default Trigger reference values, AMQP Trigger provides the following additional values.
#trigger.data (Frends.ExecutableProcess.CaseInsensitivePropertyTree)
Object containing the data derived from input parameters and the resulting data from processing the Trigger.
#trigger.data.applicationProperties (Dictionary<String, String>)
Dictionary containing the custom application headers for the message.
#trigger.data.body (String)
Contents of the message body.
#trigger.data.properties (Dictionary<String, String>)
The standard AMQP message properties. You can check http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties for details.
Last updated
Was this helpful?