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: 
http://camel.465427.n5.nabble.com/Reading-multiple-JMS-messages-inside-a-Route-tp5769232.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to