Skip to content

RabbitMQ missing queue re-declaring does not work #832

@LincolnPuzey

Description

@LincolnPuzey

Relates to #556

Checklist

  • Does your title concisely summarize the problem?
  • Did you include a minimal, reproducible example?
  • What OS are you using?
  • What version of Python are you using?
  • What version of Dramatiq are you using?
  • What Broker are you using?
  • What did you do?
  • What did you expect would happen?

What OS are you using?

Linux mint 22.3

What version of Python are you using?

3.10.19

What version of Dramatiq are you using?

master branch

What Broker are you using?

RabbitMQ - server version 4.2.2

What did you do?

Using the following minimal app:

import dramatiq.brokers.rabbitmq

broker = dramatiq.brokers.rabbitmq.RabbitmqBroker(confirm_delivery=True)
dramatiq.set_broker(broker)


@dramatiq.actor
def foo():
    pass

When deleting a Queue, dramatiq does not detect this and does not recreate it.
This happens both from the publisher and consumer side.

On the consumer side, if you;

  1. Start a Worker to ensure the queues are created
  2. Delete the queue while the Worker is running

The worker then constantly loops with the error:

 [dramatiq.worker.ConsumerThread(default)] [CRITICAL] Consumer encountered a connection error: (404, "NOT_FOUND - no queue 'default' in vhost '/'")

and the queue is not re-declared.

On the publisher side, if you

  1. Send one message to ensure queue is created
  2. Delete the queue
  3. Send another message

Sending the second messages silently fails (!) to send the message, because Dramatiq does not use the mandatory flag.

What did you expect would happen?

Not sure, but #556 implies that the queue should be re-declared.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions