qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Batch/Bulk receive messages using java client?
Date Thu, 12 Jul 2012 17:08:45 GMT
On 07/12/2012 05:53 PM, Praveen M wrote:
> Hi,
> I'm trying to explore if there are ways to batch message processing.
> Batching message processing would help us improve performance for some of
> our use cases,
> where we could chunk messages and process them in a single callback.
> Have anyone here explored building a layer to batch messages.
> I am using the Java Broker and the Java client.
> I would like to stick to the JMS api as much as possible.
> This is what I currently have, still wondering if it'd work.
> 1) When the onMessage() callback is triggered, create a consumer a pull
> more messages to process from the queue where the message was delivered
> from.
> 2) Pull messages upto the number of my max chunk size, or upto the messages
> available in the queue.
> 3) process all the messages together and commit on the session.
> I'd like to hear ideas on how to go about this.

I wouldn't mix using MessageListener and receive() (and you don't need 
to create a consumer per batch).

Otherwise, using receive() to get N messages (if available), process 
them all together and then either manually acknowledge or commit seems 
quite simple and sensible to me.

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message