RabbitMQ Setup#
This task establishes a connection to a RabbitMQ broker using the provided configuration details. It is typically the first RabbitMQ-related task you would execute in a workflow to enable communication with the broker.
Inputs#
| Name | Data Type | Description |
|---|---|---|
| RabbitMQ Address | String | The address (URI) of the RabbitMQ broker. |
| Use client certificates for authentication in RabbitMQ? | Boolean | If true, the system will attempt to use client certificates for authentication. Requires SSL Pem Certificate and SSL CA Certificate Pem to be configured. |
| Security protocol used to access RabbitMQ | String | The security protocol to use for the connection. See Settings for available options (e.g., Plaintext, Ssl). |
| User name to use for authentication in RabbitMQ | String | The username for authenticating with the RabbitMQ broker. |
| RabbitMQ password | Password | The password for authenticating with the RabbitMQ broker. |
| SSL Pem Certificate | String | The PEM-encoded SSL client certificate. Required if RabbitMQ UseClientCertificatesistrue` or if the security protocol requires it. |
| SSL Private Key | String | The PEM-encoded SSL client private key. Required if UseClientCertificates is true or if the security protocol requires it. |
| SSL CA Certificate Pem | String | The PEM-encoded SSL CA certificate(s) used to verify the server's certificate. Required for TLS/SSL connections with certificate validation. |
| Validate RabbitMQ Certificates | Boolean | If true, the task will validate the SSL certificates of the RabbitMQ broker. This is recommended for secure connections. |
| Activate | Boolean | Triggers the task to establish the connection to the RabbitMQ broker using the provided and configured settings. |
Outputs#
| Name | Data Type | Values | Description |
|---|---|---|---|
| Success | Boolean | Emits true when the connection to the RabbitMQ broker is successfully established. | |
| Error | Error | Emits an Error object if establishing the connection fails. |
Settings#
On the General Tab, you have the usual settings and the following settings related to connection timeouts and retry mechanisms:
| Name | Data Type | Default | Description | Values | |"--------------------------------------------------------|------------|------------------------|- ---------------------|----------------------| | Connecting Timeout | Integer | 30000 | The maximum time (in milliseconds) to wait for the initial connection to the RabbitMQ broker to be established. | | | Sleep between attempts | Integer | 10000 | The time (in milliseconds) to wait between connection attempts if the initial connection fails. | | | Heartbeat Interval | Integer | 60000 | The interval (in milliseconds) at which heartbeat frames are sent to the RabbitMQ broker to ensure the connection is still valid. Some protocols may not detect connection drops in realtime. | | | Retry Attempts | Integer | 30 | The maximum number of times the task will attempt to connect (or reconnect) to the RabbitMQ broker before failing. | | | RabbitMQ Unique Name | String | | The name to give to the RabbitMQ System | | | Max Concurrent Jobs | Integer | 10 | The maximum number of concurrent operations this connection can handle. | | | RabbitMQ Address | String | amqp://rabbitmq:5672 | The RabbitMQ address | | | Use client certificates for authentication in RabbitMQ? | Boolean | false | Should the system use client certificates | | | Security protocol used to access RabbitMQ | enum | Plaintext | The security protocol to use for the connection. | Plaintext or Ssl | | User name to use for authentication in RabbitMQ | String | | User name | | | RabbitMQ password | Password | | User password | | | SSL Pem Certificate | String | | SSL Pem Certificate | | | SSL Private Key | String | | SSL Private Key | | | SSL CA Certificate Pem | String | | SSL CA Certificate Pem | | | Validate RabbitMQ Certificates | Boolean | true | If true, the task will validate the SSL/TLS certificate presented by the RabbitMQ broker. This should be enabled for secure connections to prevent man-in-the-middle attacks. | |
Behavior#
The RabbitMQ Setup is used when configuring the RabbitMQ. This task needs to be properly configured and called in runtime, so that the usage of the other RabbitMQ tasks can be used.
When the Activate input is triggered, this task attempts to establish a connection to the RabbitMQ broker using the configuration provided through its input properties and settings.
It uses a RabbitMQ Manager to handle the connection process, taking into account settings such as the connection timeout, retry attempts, and security protocol. If client certificates or TLS/SSL are configured, the task will use the provided certificate and key files for authentication and encryption.
If the connection is successfully established within the configured timeout and retry attempts, the Success output emits true. If any error occurs during the connection process (e.g., incorrect address, authentication failure, TLS/SSL handshake issues), the Error output will emit an Error object containing details about the failure.
Once the task completes successfully, the established RabbitMQ connection can be used by other RabbitMQ-related tasks in the same controller.
Remarks#
- This task should only be used once per Automation Controller, as only one RabbitMQ connection is supported.
