[rabbitmq-discuss] BasicCancel and the QueueingBasicConsumer SharedQueue

Mark Ward ward.mark at gmail.com
Tue Nov 6 17:44:38 GMT 2012


Matthias,

> Why do you want to do that? 

I was under the impression I could have a BasicConsumer running and be able
to subscribe/unsubscribe to queues while it was running.  

Currently I have a part of my program that creates a channel subscribes to a
temporary queue and drains it then closes the channel.  This process is
repeated for a number of temporary queues.  I was preparing some code that
in the case the creation of channels became costly to throughput that I
would recycle a channel and just subscribe/unsubscribe between the temporary
queues that I want to process. 

Although I have not walked through the idea of creating new BasicConsumers
between queues if that might improve throughput.

What I want to make sure happens is the connection's channel is not
subscribed to the queue when the client deletes the temporary queue. 
BasicCancel works but I also need to make sure my loop processing the
BasicConsumer SharedQueue is stopped to avoid the exception from dequeue().

I will continue with my current channel open/drain/channel close/ (delete
queue) implementation.  I have my queues set to auto delete but to keep
rabbitMQ's resources in check I like having the client clean up the
resources when it knows the queue will no longer be used.  I may look into
rebuilding BasicConsumers on the channel to see if this works......

Thank you for helping me dig into this side of the .net client
implementation.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/BasicCancel-and-the-QueueingBasicConsumer-SharedQueue-tp23114p23147.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list