Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about RMQ queues that dramatiq uses #678

Open
bmrobin opened this issue Jan 28, 2025 · 0 comments
Open

question about RMQ queues that dramatiq uses #678

bmrobin opened this issue Jan 28, 2025 · 0 comments

Comments

@bmrobin
Copy link

bmrobin commented Jan 28, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant