---
title: "amqp: Publish messages using AMQP"
url: "https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-amqp/"
last_modified: "2026-08-02T11:39:11+02:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# amqp: Publish messages using AMQP

The `amqp()` driver publishes messages using the [AMQP (Advanced Message Queuing Protocol)](https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol). AxoSyslog supports AMQP versions 0.9.1 and 1.0. The AxoSyslog `amqp()` driver supports persistence, and every available exchange types.

The name-value pairs selected with the `value-pairs()` option will be sent as AMQP headers, while the body of the AMQP message is empty by default (but you can add custom content using the `body()` option). Publishing the name-value pairs as headers makes it possible to use the Headers exchange-type and subscribe only to interesting log streams. This solution is more flexible than using the `routing-key()` option.

For the list of available parameters, see [amqp() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-amqp/reference-destination-amqp/index.md).

## Prerequisites

This feature requires a separate module. Install the `axosyslog-mod-amqp` package on [Debian/Ubuntu](https://axoflow.com/docs/axosyslog-core/4.28/install/debian-ubuntu/index.md), or the `axosyslog-amqp` package on [RHEL and compatible distributions](https://axoflow.com/docs/axosyslog-core/4.28/install/rhel-fedora-almalinux/index.md). If the module isn’t installed, AxoSyslog fails to start with an [`unexpected LL_IDENTIFIER` error](https://axoflow.com/docs/axosyslog-core/4.28/chapter-troubleshooting-syslog-ng/unexpected-ll-identifier/index.md).

## Declaration:

```shell
   amqp( host("<amqp-server-address>") );
```

## Example: Using the amqp() driver

The following example shows the default values of the available options.

```shell
   destination d_amqp {
        amqp(
            vhost("/")
            host("127.0.0.1")
            port(5672)
            exchange("syslog")
            exchange-type("fanout")
            routing-key("")
            body("")
            persistent(yes)
            value-pairs(
                scope("selected-macros" "nv-pairs" "sdata")
            )
        );
    };
```

---

[amqp() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-amqp/reference-destination-amqp/index.md)

Last modified August 2, 2026: [Adds required modules/packages to install and destination pages (553d6d9b)](https://github.com/axoflow/axosyslog-core-docs/commit/553d6d9be9a0e3ef444e62cc5351dd2ac764f01d)
