camel-users mailing list archives

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

There is the content enrhcier eip where you can pollEnrich from other
jms queues.
http://camel.apache.org/content-enricher.html

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
http://camel.465427.n5.nabble.com/Aggregated-JMS-component-tp5768736.html

On Mon, Jul 13, 2015 at 2:40 PM, Gabowsky <rendesg@gmail.com> 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: 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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message