If you want to configure an application invocation triggered by receiving a message from the RabbitMQ broker, you need to select the TRIGGERS option from the main menu.
By selecting New…, you can add a new configuration for automatically starting the GRAVITY application.
After choosing the New… option, you need to select the type of automatic invocation from the list.
If you decide to use the message-broker notification mechanism, select RABBITMQ from the list.
In the PROPERTIES area, you also need to indicate the GRAVITY application (project) that will from now on be associated with the configured invocation.
A trigger of this type passes the message received from the RabbitMQ server to the project parameter that it invokes. For this reason, at least one parameter needs to be defined in the project.
To complete the configuration, you need to provide the data required for this trigger type.
- RabbitMQ connection → the connection to the RabbitMQ server from which you will receive messages
- Queue name → the name of the queue from which you will receive messages
- Auto acknowledgement → whether to send information to the server confirming or rejecting a message
- false → does not send any message to the server, and the server assumes correct processing by default
- true → sends information to the server about successful or failed message processing depending on the result of the process executed as part of this trigger
- Message to parameter → the process parameter to which the received message will be passed.
To prevent this, we encourage you to review the server configuration using the DLX and TTL strategies.
To make the trigger active, you need to set the Enabled switch to on.
If you want the system to send an email to specified recipients when a process error occurs, you need to enable the Send mail when error option.
If the project uses parameters, they will be displayed in the Parameters panel as a name–value list. By clicking a value, you can enter a default value for the trigger parameter.
The default value will be used if the trigger does not receive a value for this parameter from the invocation (for example, REST API, database, RabbitMQ, etc.) and will be passed to the executed project.