[rabbitmq-discuss] Creating Multiple Consumers bounded to same channel in different threads
Prashant
prayadav at gmail.com
Thu Feb 10 12:23:28 GMT 2011
I already did that :) ( that was what I tried and it works!!!).Still
am confused as to why we would neeed to open a channel for each
consumer. The troulble is I have dynamic number of consumers and am
afraid woudl this approach will scale well( 40 consumers -> 40
channels). Also , there might be some idle consumers( I am planning to
develope provision to detect idle consumers by computing last
delivery ) and close the consumer ( basicCancel ) and further close
the channel as well ( close( message)).
Do you think this approach would scale well ?
Later
P
On Feb 10, 9:40 am, "Jason J. W. Williams" <jasonjwwilli... at gmail.com>
wrote:
> 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 <praya... 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-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list