Hello

XA transactions are your friend in this scenario.

Beware that the whole goal of leveraging a Message Broker is to decouple
the producer from the consumer. In fact, when the producer sends the
message, there may be a consumer there may be not, but if you've set the
JMS delivery mode appropriately, the broker guarantees to attempt deliver
the message once the consumer is online again.

You should think of producer-broker and broker-consumer as transactional
boundaries where a handover of responsibilities is occurring. The producer
and consumer never interact directly.

So you have two options:

* Leverage XA transactions and delegate the responsibility of delivery to
the broker (thus honouring the philosophy of async messaging).
* Implement a custom mechanism for the consumer to send an ACK to the
consumer, perhaps using JMS Reply To.

Regards,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Fri, Apr 4, 2014 at 3:33 PM, npa <[email protected]> wrote:

> I have been trying to come up with a camel route that would read from an
> activemq and write to Oracle AQ.
>
> However, when a message is written to Oracle-aq(all I care is succesfull
> delivery of the msg to Oracle aq), I have to write a successful message to
> another Active mq queue("something like message with id 41 has been sent to
> OracleAQ")
>
> Is there any "Auto-acknowledge" type of feature in camel that can be useful
> here?
>
> This is the basic route that i have that routes from active mq to oracle
> aq.
>
> <route>
>     <from uri="jms:queue:Q.Customer1"/>
>         <setHeader headerName="prop">
>         <simple>header1Value</simple>
>         </setHeader>
>     <to uri="oracleQueue:queue:Q.Customer2"/>
> </route>
>
> Would it be better to use a transaction and have below 2. steps in the same
> transaction, so that the second happens after only if the first happened
> successfully.
>
> 1. Writing a message to Oracleaq from active mq
> 2. If (1.) happens successfully, then write a message to activemq2
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Succesful-delivery-acknowledgements-tp5749806.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to