Hi,

I have a Camel application design question. My requirement is as following:
1. The data source is from an activemq queue
2. the data is processed by serveral different processors in a row
3. the data is stored in database finally.

The main problem is on my processors threading model. I read the doc and it describes that most processors should be singleton. But in my case my processor can not be singleton because it depends on some non-thread-safe complicate calculation libraries. It's also not acceptable to create a new instance of the processor for each data as the cost of processor initilization is very high.

I had thought about the possible solutions for this and got 2 ideas:
1. create several rows of processors and store the rows in some kind of pool. For each data I pick up one row and process it through the processes in the that row. 2. create different pools for different type of processors. When data is arrived, pick processors from those pools.

Is it possible to implement this with Camel?

Reply via email to