camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabowsky <>
Subject Re: Reading multiple JMS messages inside a Route
Date Tue, 14 Jul 2015 11:54:17 GMT
Hi Claus,

Thanks for the tips about the pollEnricher and the sjms component! They
seems indeed useful for this use-case, unfortunately since sjms cannot
aggregate messages currently, and pollEnrich accepts only one message as
response, i couldn't make use of them :(

Anyway, I ended up with a custom solution where in a custom Processor i read
the queue (without acknowledging the messages, but storing their IDs!), and
prepare the reply message for the WS client. After the route has been
completed, in an OnCompletion section I have defined a Synchronization,
which extracts the messageIDs and dequeue-s them directly (via JMS Message
Selectors) from the very same queue with auto-acknowledge. 

Theoretically it is possible with this approach that a message is already
read by the client and but it just couldn't be dequeued due to a severe
server fault, but it won't cause any problem because luckily in this case
the WS client can process the same messages without any problem.

Yes, this is not the most efficient, but (I hope) a 100% reliable way, and
thats what I need now.

Thanks once again for your input!

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message