This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.3.

# Native Delayed Delivery - `native_delayed_delivery`

Added in version 5.5.

Native Delayed Delivery API.

Only relevant for RabbitMQ.

kombu.transport.native_delayed_delivery.bind_queue_to_native_delayed_delivery_exchange(connection: Connection, queue: Queue) → None

  Bind a queue to the native delayed delivery exchange.

  When a message arrives at the delivery exchange, it must be forwarded to the original exchange and queue. To accomplish this, the function retrieves the exchange or binding objects associated with the queue and binds them to the delivery exchange.

  Parameters:

    - connection (Connection) – The connection object used to create and manage the channel.

    - queue (Queue) – The queue to be bound to the native delayed delivery exchange.

  ## Warning:

  > If a direct exchange is detected, a warning will be logged because native delayed delivery does not support direct exchanges.

kombu.transport.native_delayed_delivery.calculate_routing_key(countdown: int, routing_key: str) → str

  Calculate the routing key for publishing a delayed message based on the countdown.

kombu.transport.native_delayed_delivery.declare_native_delayed_delivery_exchanges_and_queues(connection: Connection, queue_type: str) → None

  Declares all native delayed delivery exchanges and queues.

kombu.transport.native_delayed_delivery.level_name(level: int) → str

  Generates the delayed queue/exchange name based on the level.