How can I clear the MassTransit queue?

I want to delete all messages from the queue in my test program SetUp, how to do this? Unlucky with the / intellisense -bruteforce search engine.

If that matters, I use RabbitMq as a transport.

+4
source share
1 answer

Unable to β€œdelete” from queues in MassTransit. For tests, you can use temporary URIs with an arbitrary queue via rabbitmq://localhost/*?temporary=true . Or you can simply add ?temporary=true to the end of the existing queue URIs to remove the MT files after that. Note: Current, from 2.8, temporary exchanges are not cleared. This should be fixed in a future release.

+5
source

Source: https://habr.com/ru/post/1496488/


All Articles