camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Reading multiple JMS messages inside a Route
Date Mon, 13 Jul 2015 12:53:42 GMT

There is the content enrhcier eip where you can pollEnrich from other
jms queues.

But if you want to read X messages from the same queue in a batch like
fashion then there is camel-sjms, and new work by Jakub that we would
like to finish up and get into Camel

On Mon, Jul 13, 2015 at 2:40 PM, Gabowsky <> wrote:
> Hi everyone,
> My use-case is the following: upon an external request, I would like to read
> multiple messages from a given queue (this queue collects the messages and
> this route should give them for a polling client), and after some
> transformations, return them in the reply message. I would like to find a
> reliable solution, eg. messages shouldn't be lost.
> As far as I know, Camel doesn't support neither reading multiple messages
> from a queue, nor reading messages inside a route (?), so I have to use a
> custom solution.
> I came up with the following idea: in a Processor, I make use of a (bit
> enhanced version of) JmsTemplate, which can read (multiple message) from a
> queue synchronously, with a client-side session acknowledgement mode
> (without any transactions). In the very same processor i transform these
> messages to create the reply message and if everything goes well, i would
> acknowledge the messages and close the jms session.
> Is there a more elegant/simpler way to do this? Is there any flaw with this
> approach?
> Thanks,
> Gabowsky
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message