> For the complete documentation index, see [llms.txt](https://docs.valtimo.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valtimo.nl/v12/fundamentals/getting-started/modules/core/outbox/outbox-rabbitmq.md).

# Outbox RabbitMQ

## Dependencies

The `outbox-rabbitmq` module provides an outbox message publisher for RabbitMQ.

### Backend

The samples below assume the [valtimo-dependency-versions](/v12/fundamentals/getting-started/modules/core/valtimo-dependency-versions.md) module is used. If not, please specify the artifact version as well.

#### Maven dependency:

```xml

<dependencies>
  <dependency>
    <groupId>com.ritense.valtimo</groupId>
    <artifactId>outbox-rabbitmq</artifactId>
    <version>${valtimo_version}</version>
  </dependency>
</dependencies>
```

#### Gradle dependency:

```kotlin
dependencies {
    implementation("com.ritense.valtimo:outbox-rabbitmq")
}
```

## Configuration

In order to use this module, the following configuration properties need to be added to the application properties. Please adjust values to match the environment:

#### **`application.yml`**

```yaml
spring:
  rabbitmq:
    host: localhost
    port: 5672
    username: guest
    password: guest
    ssl.enabled: true # Optional. Defaults to false
    publisher-confirm-type: correlated # required value
    publisher-returns: true # required value

valtimo:
  outbox:
    publisher:
      rabbitmq:
        exchange: valtimo-events # Optional. Defaults to `spring.rabbitmq.template.exchange`.
        routing-key: valtimo-audit # Optional. Defaults `spring.rabbitmq.template.routing-key`.
        delivery-timeout: "PT0.5S" # ISO 8601 duration format
```

Using an exchange can be useful when you want more refined control over what targets (queues or topics) will receive the message. It is also possible to setup multiple targets via the RabbitMQ configuration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.valtimo.nl/v12/fundamentals/getting-started/modules/core/outbox/outbox-rabbitmq.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.
