Skip to content

question about RMQ queues that dramatiq uses #678

Open
@bmrobin

Description

can you help me understand how dramatiq uses delayed queues for RabbitMQ ? when i call declare_queue('my_queue') i see that it is also creating my_queue.DQ https://github.com/Bogdanp/dramatiq/blob/master/dramatiq/brokers/rabbitmq.py#L241

i have a task that im submitting without any delay, and yet i still see the .DQ in use when i look at my local RMQ instance.

Image

here's a contrived example of how i'm configuring the broker & task

broker = RabbitmqBroker(
    url="amqp://user:password@server:port/vhost",
    middleware=[AsyncIO(), Retries(), Pipelines()],
    confirm_delivery=True,
)
broker.declare_queue('cultivate.load_requests', ensure=True)
dramatiq.set_broker(broker)


async def my_task() -> None:
    pass


@dramatiq.actor(
    queue_name="cultivate.load_requests",
    broker=broker,
)
async def process_interpretation_request_task() -> None:
    await my_task()

process_interpretation_request_task.send()

from what i can tell in the source code, the delay shouldn't be used since unless delay was passed in. so can you help me understand why the .DQ queue is being used?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions