git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is transaction (required) by default enabled for the route sending message from one jms endpoint to another endpoint


As the transaction is bit complicated, you need to setup the
transaction manager yourself on the jms component first, then you can
apply the policy. So I don't think we can provide the transaction
policy out of box.

Please check out this document[1] for more information about setting
the transaction policy between the jms component.

[1]https://github.com/apache/camel/blob/master/camel-core/src/main/docs/eips/transactional-client.adoc

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem
On Sun, Oct 21, 2018 at 2:27 PM Wang Yan <wyanbox@xxxxxxxxx> wrote:
>
> is transaction (required) by default enabled for the route sending message
> from one jms endpoint to another endpoint like below
>
>  from("activemq:queue:foo").to("activemq:queue:bar");
>
> or i have to explicitly do like  below ?
> Policy requried = bean(SpringTransactionPolicy.class,
> "PROPAGATION_REQUIRED"));
>  from("activemq:queue:foo").policy(required).to("activemq:queue:bar");
>
> Any hints or suggestions are more than welcome!