News KrakenD Enterprise v2.3: Easing Your API Journey


Recent changes

You are viewing a previous version of KrakenD Community Edition (v2.1) , go to the latest version

AMQP driver for Async Agent

Last update: Jan 21, 2022

The AMQP driver for Async agents allows you to have KrakenD consuming AMQP queues autonomously. Routines listening to AMQP queues will react by themselves to new events and push data to your backends.

This driver is different from the AMQP backend consumer. As opposed to endpoints, async agents do not require users to request something to trigger an action. Instead, the agents connect to the queue and fire an action when an event is delivered.

Async/AMQP Driver Configuration

The AMQP driver has to be placed inside the extra_config of the async component and allows you connect to an AMQP queue (e.g: RabbitMQ). The settings are as follows:

    "async/amqp": {
        "host": "amqp://guest:[email protected]:5672/",
        "name": "krakend",
        "exchange": "foo",
        "durable": true,
        "delete": false,
        "exclusive": false,
        "no_wait": true,
        "prefetch_count": 5,
        "auto_ack": false,
        "no_local": true

When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACK. Defaults to false.
Defaults to false

false is recommended to avoid deletions when the consumer is disconnected.
Defaults to false

Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. Most of the times true is recommended, but depends on the use case.
Defaults to false
exchange  *

The entity name where messages are retrieved (it will be created, or it must have a topic type if already exists).

true if only this consumer can access the queue.
Defaults to false
host  *

The connection string, ends in slash. E.g: amqp://user:[email protected]:5672/.
name  *

The queue name.

The no_local flag is not supported by RabbitMQ.

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

The number of messages you want to prefetch prior to consume them.
Defaults to 10

The number of bytes you want to use to prefetch messages.
Defaults to 0

* indicates a required field. Parameters in alphabetical order.

Unresolved issues?

The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.

We use cookies to understand how you use our site and to improve your overall experience. By continuing to use our site, you accept our Privacy Policy. More information