RabbitMQ

Discover more about the RabbitMQ connector and how to use it on the Digibee Integration Platform.

RabbitMQ allows messages to be published in a RabbitMQ broker.

Parameters

Take a look at the configuration parameters of the connector. Parameters supported by Double Braces expressions are marked with (DB).

Important: the configuration parameters won't be defined in the message if their values are left in blank.

Example of request answer to RabbitMQ

<SAME MESSAGE INFORMED IN THE INPUT>

Important: RabbitMQ doesn't change the message presented in its input, except in case of error.

Example of request answer to RabbitMQ with error

{
"success": false,
"message": "Could not publish message to RabbitMQ due to an error",
"error": "java.net.SocketTimeoutException: connect timed out"
}
  • success: “false” when the operation fails

  • message: message about the error

  • exception: information about the type of occurred

Messages flow

Input

The connector accepts any input message, being able to use it through Double Braces.

Output

  • without error

<SAME MESSAGE INFORMED IN THE INPUT>
  • with error

{
"success": false,
"message": "Could not publish message to RabbitMQ due to an error",
"error": "java.net.SocketTimeoutException: connect timed out"
}

RabbitMQ in action

A message is always sent through this connector from Exchange Name and Routing Key. The exchange has a bind with a topic or queue and forwards the message from the routing key.

Sending a simple message

Input message:

{
"message": "test"
}

Configurations:

  • Hostname: <RABBITMQ HOSTNAME>

  • Port: <PORT> (pattern port: 5672)

  • Virtual Host: /

  • Exchange Name: <EXCHANGE NAME>

  • Binary Message: disabled

  • Message: {{ message.$ }}

  • Routing Key: <ROUTING KEY>

  • Fail On Error: disabled

Result:

{
"message": "test"
}

Sending a simple binary message

Input message:

{
"message": "ewoJIm1lc3NhZ2UiOiAidGVzdCIKfQo="
}

Configurations:

  • Hostname: <RABBITMQ HOSTNAME>

  • Port: <PORT> (pattern port: 5672)

  • Virtual Host: /

  • Exchange Name: <EXCHANGE NAME>

  • Binary Message: enabled

  • Message: {{ message.message }}

  • Routing Key: <ROUTING KEY>

  • Fail On Error: disabled

Result:

{
"message": "ewoJIm1lc3NhZ2UiOiAidGVzdCIKfQo="
}

Sending a message to a queue and the response will be returned to another specificated one (Direct Reply-To)

Input message:

{
"message": "test"
}

Configurations:

  • Hostname: <RABBITMQ HOSTNAME>

  • Port: <PORT> (pattern port: 5672)

  • Virtual Host: /

  • Exchange Name: <EXCHANGE NAME>

  • Binary Message: disabled

  • Message: {{ message.$ }}

  • Routing Key: <ROUTING KEY>

  • Reply To: <REPLY TO>

  • Fail On Error: disabled

Result:

{
"message": "test"
}

Last updated