Discussion:
is transaction (required) by default enabled for the route sending message from one jms endpoint to another endpoint
Wang Yan
2018-10-21 06:27:34 UTC
Permalink
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!
Willem Jiang
2018-11-02 02:36:12 UTC
Permalink
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
Post by Wang Yan
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!
Loading...