[rabbitmq-discuss] Design pattern for queue with alot of small data?

Gautam gautam.bakshi at gmail.com
Fri Apr 27 15:45:29 BST 2012


Hi Everyone,

I am using rabbitmq as my queue server but my workers are having a slight 
problem.  I create a connection then send it to multiple threads who in 
turn create their own channels and then have each thread does its own work 
on the thread. Its basically a threaded version 
of: http://www.rabbitmq.com/tutorials/tutorial-two-java.html

But when I profile my code over half the time is spent 
in com.rabbitmq.client.impl.SocketFrameHandler.readFrame() I think it makes 
sense(if thats the part that reads the queue) as my work for each worker is 
not that much per item(there's just alot of items). 

Is there something I can do to make this part faster?  Right now, I set the 
awk to 200  and thread the awk part of the code.  Is there something that 
would allow me to download data in bulk? or anything else that could make 
it go faster(it seems like my program can finish the work quicker than the 
application can send it one a time)? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120427/dd6a3dbc/attachment.htm>


More information about the rabbitmq-discuss mailing list