[rabbitmq-discuss] Creating Multiple Consumers bounded to same channel in different threads

Jason J. W. Williams jasonjwwilliams at gmail.com
Thu Feb 10 09:40:55 GMT 2011


Most of the libraries don't support sharing channels between threads. But part of the advantage of channels is that they're cheap to create, so you can share a connection between threads by giving each threads its own channel on the connection. 

-J

Sent via iPhone

Is your e-mail Premiere?

On Feb 10, 2011, at 1:40, Prashant <prayadav at gmail.com> wrote:

> Hi,
> 
> I was trying to have a single controller module that set and spawns
> multiple consumers ( as and when we need more consumers). Once I set
> up the connection and channel I go about creating multiple consumers.
> Once i start the Controller module I see either Consumer 1 created or
> consumer 2 created and served .
> i have ensured that consumer creation and serving goes in parallel i.e
> basically having two threads for 2 consumers .
> 
> Now, I have read somewhere about rabbitmq single threaded model .Does
> the above scenario is failing cause of it or its something else.
> Can you guys throw in some pointerd to dynamically create and start
> consumes ( I have consumers adding and leaving )
> 
> Regds
> Prashant
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list