I'm trying to implement priority messages using multiple queues (four in my case) with RabbitMQ and EasyNetQ.
I understand that IBus
instance should be kept alive for the whole application life cycle.
Also, the only way to stop RabbitMQ from sending more messages on a given queue is to dispose of the IBus
using Dispose
.
Given these two contradicting factors how should I architect this?
One IBus
instance per queue and if messages on the more important queue are being sent disposing (and later recreating) of the less important ones?