When declaring a "Consumer", the exchange is also declared. This means the consumers auto_delete setting will be used for the exchange as well.
I see some solutions here:
- Don't declare the exchange in the consumer.
- Have the ability to use an
Exchange as the exchange argument:
e = Exchange("foo", "direct", auto_delete=True)
c = Consumer(queue="foo", exchange=e, auto_delete=False)