You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by npa <np...@gmail.com> on 2014/04/04 16:33:52 UTC

Camel Succesful delivery acknowledgements..

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.

Re: Camel Succesful delivery acknowledgements..

Posted by npa <np...@gmail.com>.
Does Camel have any indicators that the message has been succesfully
delivered to the consumer. As a producer, how do I know that message has
been delivered, so that I can issue out succesful acknowledgements.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Succesful-delivery-acknowledgements-tp5749806p5749808.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Succesful delivery acknowledgements..

Posted by npa <np...@gmail.com>.
Hello,

I remember reading somewhere that XA transactions are slow, overkill and not
reliable.

Do you think a regular transaction would do the job for me here. A single
transaction which would cover the 2 "to" uri's.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Succesful-delivery-acknowledgements-tp5749806p5749815.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Succesful delivery acknowledgements..

Posted by Raul Kripalani <ra...@evosent.com>.
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 <np...@gmail.com> 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.
>