Azure / amqpnetlite

AMQP 1.0 .NET Library
Apache License 2.0
396 stars 141 forks source link

How to create auto-delete queues #558

Closed timbrando closed 1 year ago

timbrando commented 1 year ago

Hi,

I have a working amqpnetlite client that receives messages from a RabbitMQ server using subscription to topics. The ReceiverLink auto-creates queues for every topic I subscribe to. But the queues are never deleted and still exist beyond the lifetime of my application which very fast floods the server with queues and unreceived messages that lead to a server outage recently because the disk was full. Is there any way to tell that the queue can be deleted after the last subscriber unsubscribes (the way it works with AMQP 0-9-1's auto-delete property)? Or is there at least a method to get and delete the queues manually created by the ReceiverLink?

I tried to create the ReceiverLink with a Source object: Source source = new Source { Address = routingKey, ExpiryPolicy = "link-detach", Timeout = 3000 }; This did not affect the queue. It has not been deleted after the 3000 ms.

xinchen10 commented 1 year ago

Have you asked RabbitMQ in their amqp1.0 support, how the auto-created queues are deleted?

timbrando commented 1 year ago

Hi, sorry for the late reply. In the mean time I asked in the rabbitmq mailing list but haven't received an answer yet. However, I just found out that this is an open issue (https://github.com/rabbitmq/rabbitmq-server/issues/2588) in the AMQP1.0 plugin of RabbitMQ and not a problem to fix on the client side.