On Wed, Jan 9, 2013 at 8:13 AM, orz <[email protected]> wrote: > Hi, > > Thanks for your reply. I have already read chapters 8 and 9. > > I understand that I can use HawtDBAggregationRepository and redirect the > aggregated exchange(s) to a DLQ after a certain number of retries. > > However, that is not what I want. I need it to behave like the following > steps > 1. Message A sent to jms:queue:test > 2. Aggregator takes message A from jms:queue:test > 3. Message B sent to jms:queue:test > 4. Aggregator takes message B from jms:queue:test and merged as a new > exchange > 5. Aggregator sends new exchange to Http endpoint and > HttpOperationFailedException is thrown. > 6. The transaction is rollbacked and Message A & B still remain on > jms:queue:test >
This is not possible with the aggregator. You would need to write your own java bean, and consume the 2 messages from the JMS queue. And merge them yourself. And call the http (you can use Camel for that). And in case of exception, then rollback. For example using client ack mode etc. And alternative is to send the 2 messages back on the JMS queue, though then they would be inserted as new messages, and on top of the queue. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Transactional-aggregator-tp5725084p5725165.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
