[rabbitmq-discuss] Query - Batch Consume

David Wragg david at rabbitmq.com
Thu Jul 29 13:25:11 BST 2010


Abhishek K <abhishek.kona at gmail.com> writes:
> But will not batching reduce network transfers?
> I mean if there are 10 items in a queue. Can a consumer consume them in one
> network transfer?
> Can something like that be done.

AMQP already permits an AMQP server to deliver many messages to a
consumer in a single network transfer (unless the consumer does
something like setting qos which would prevent this).

The RabbitMQ broker does not currently strive to make this happen - it
looks like it will do one write to the socket for each AMQP frame.  But
the operating system TCP stack might coalesce several socket writes into
a single IP packet.  I haven't looked at packet traces to check whether
this actually happens.

So RabbitMQ is either already doing what you suggest, or could be
optimised to do so, without introducing batch operations.  This is a key
advantage of an asynchronous protocol.

David

-- 
David Wragg
Staff Engineer, RabbitMQ
SpringSource, a division of VMware


More information about the rabbitmq-discuss mailing list