[rabbitmq-discuss] Will this work?

Tony Garnock-Jones tonyg at lshift.net
Wed Feb 17 06:44:22 GMT 2010


Dinabandhu Mitra wrote:
> Thanks. I must have misunderstood the post. I will change my code to
> have a single shared socket, single shared connection but per thread
> channel.

I would be extremely careful here. The rabbitmq-c library is built with
event-driven, single-threaded applications in mind, and does not yet
cater to any of the requirements of pthreaded applications. I do not
think you will have much luck sharing a single connection between
multiple threads, even using multiple channels. Instead, I would
recommend a separate full *connection* per thread when using the
rabbitmq-c library.

Regards,
  Tony





More information about the rabbitmq-discuss mailing list