# RabbitMQService

The **RabbitMQService** listens to a queue on a RabbitMQ server and triggers an event when a new message arrives.

***

## Properties

### Return raw bytes

If checked, the contents of the message's body will be returned as a list of bytes.

### Content type

The type of data that the body contains.

### Character encoding

The character encoding to use to decode the body to a string.

### Queue name

The name of the queue on the RabbitMQ server from which to fetch the messages.

### Headers

The list of expected headers. Each entry will create a corresponding property in the input of the [MessageReceived](#messagereceived) event to store the header's value. Any headers of the message that are not specified will be included in the *AdditionalHeaders* property of the event's input.

### Connection uri

Server details.

Click the **...** icon to open the **Connection Editor**.

**Host**:

The IP address or domain name of the server to connect to.

**Port**:

The port number to connect to. RabbitMQ server runs on port 5672 by default.

**Username**:

The username to use for authentication.

**Password**:

The password to use for authentication.

**Virtual host**:

The virtual host to access on the RabbitMQ server.

**Use SSL**:

Select if SSL must be used when connecting.

***

## Events

### MessageReceived

This event is fired whenever a message is received. The message object in the Data section of the event input contains the following properties:

**Properties:**

* **AdditionalHeaders**: Stores the name and value of each header that was received for which there was no corresponding entry in the specified Headers.
* **Body**: The contents of the message.
* **CorrelationID**: The correlation ID of the message.
* **DeliveryTag**: A string that uniquely identifies the message.
* **ExchangeName**: The name of the Exchange that the message was published to.
* **Headers**: Available if at least one entry was specified for Headers. Contains one property per entry.
* **RoutingKey**: The routing key of the message.
* **ReplyTo**: The name of the reply-to queue of the message.

***

## Links

[RabbitMQ web site](http://www.rabbitmq.com)

[AMQP Model](https://www.rabbitmq.com/tutorials/amqp-concepts.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/rabbitmq/content/rabbitmqservice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
