[rabbitmq-discuss] connection/channel pooling

Gojko Adzic gojko-yahoolist at gojko.com
Wed Nov 11 00:53:25 GMT 2009


Hi,

I'm evaluating rabbitmq so bear with me while I post a ton of beginner 
questions in the next few days. I'm using the Java API to post messages 
from a cluster of application servers and amqp-as3 to read them. I have 
the basic examples working, but couldn't find enough information on 
connectivity best practices to satisfy my curiosity. So I'd appreciate 
some expert advice :) According to these two things

http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2008-November/001896.html

http://agilewebdevelopment.com/plugins/http___github_com_danielsdeleo_qusion

a connection can be cached and shared but channels should be 
thread-local. For the purpose of improving throughput, does it make 
sense to create a pool of channels or is there no penalty in opening and 
closing channel for every message sent?  Also, does multi-threaded 
posting through channels belonging to a single connection cause 
contention on the same socket? What's the best practice for throughput - 
should I have a number of connections open to post messages and then 
allocate several channels per connection, or is this an overkill?

--
gojko adzic
http://gojko.net




More information about the rabbitmq-discuss mailing list