I have one application that we deploy on a cluster. The cluster might have 2 or 4 JVMs as per the environment. The application has same CamelContext which we are deploying on all the JVMs. Hence, all the JVMs have same routes. For FTP routes, that is good as it makes it competitive and only 1 JVM gets the files. However, while using timer based operation to fetch from DB, I see that all the JVMs read the same set of records and do the same job. What I want is, if one route picks it up, the other routes shouldn't try. I tried googling for this. However, couldn't find the best way to do it. Is there any default camel component which supports this? I read the clustering and load balancing on Camel Documentation, but it didn't help. JGroups and ZooKeeper are specific to type of clusters. Any help would be appreciated.
First, the different deployed Camel contexts will act as standalone applications with no knowledge of each other.
The behavior if you have multiple routes consuming from the same sources is very component dependent.
I guess the last one is your primary question. It can be done by several means. They are probably a bit tricky to setup, but should do the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With