camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: How to create multiple outbound messages
Date Thu, 03 Jan 2008 13:32:03 GMT
On 03/01/2008, Patrick Shea <> wrote:
> Hi, I'm trying to express using routes how to create multiple messages from one endpoint.

FWIW the JPA endpoint does this...



would send a message for each MyFoo entity in the database (deleting
them after the message has been sent).

If you would rather update the entity bean rather than delete it, you
can annotate a method with @Consumed and it'll call that to update
itself - then use the ?consumeDelete=false on the URI.

> I did use an internal template to sendBody() multiple time but what I am trying to do
is read a sql table, send a jms message for each row, wait for acknowledment then update the

Are you using any of the existing endpoints or writing your own?

> I tried to use the CLIENT_ACKNOWLEDGE parameter on the endpoint but this does not seem
to work.

Acknowlegements are only really used for consuming JMS messages. Once
a send in JMS is completed its done.

You could look at using Spring declarative transactions when working
with JMS; then you can switch from pure JMS transactions to XA if ever
you need it etc.

Open Source Integration

View raw message