Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Camel - transaction in routes

I have a general question about Apache Camel. I wasn't able to find whether the aggregator is transacted. If it is transacted, how the transactions are implemented and how fast the aggregation is?

like image 959
user219882 Avatar asked Aug 09 '11 08:08

user219882


People also ask

How do Camel routes work?

A route in Apache Camel is a sequence of steps, executed in order by Camel, that consume and process a message. A Camel route starts with a consumer, and is followed by a chain of endpoints and processors. So firstly, a route receives a message, using a consumer – perhaps from a file on disk, or a message queue.

What is Route ID in Apache Camel?

routeId() are for identifying routes. By adding ids you can in your tests use adviceWith() to mock or inject or remove parts of your route to perform automated tests without having access to backend systems.

What is Camel route builder?

The RouteBuilder is a base class which is derived from to create routing rules using the DSL. Instances of RouteBuilder are then added to the CamelContext .


1 Answers

Sending the messages into the aggregator can run in a transaction.

You would need a persistent store with the aggregator to let the outgoing messages act as a transaction. See the documentation about persistence http://camel.apache.org/aggregator2

For example there is a JDBC based and HawtDB (file based) persistent support out of the box. Its pluggable as you can also build your custom.

Camel in Action book chapter 8 and 9 convers this in much more details.

like image 137
Claus Ibsen Avatar answered Sep 28 '22 00:09

Claus Ibsen