I have two AMQ queues that have the same consumers. The first queue (Q1) handles 97% of the messages and the other (Q2) only 3%. Problem is that messages in Q2 need to process messages as soon as they are queued. So my problem is that when a message is available in Q2 I need somehow to suspend the first route to take it's consumers. The apache camel routing looks like this:
<route id="q1">
<from uri="jms:recordAnalysisRequests" />
<to uri="bean:analysisService" />
</route>
<route id="q2">
<from uri="jms:recordAnalysisRequestsFastTrack" />
<to uri="bean:analysisService" />
</route>
What strategy should use? I don't think I can use resequencer because Q1 could have thousands of messages queued up and I cannot fit all in a resequencer batch. I was looking at the route throttling but I cannot figure out how to do it. Also I was wondering if I can synchronize through a zookeeper node. Again I will need some guidance here if this solution is viable.
[apache]and[camel]together aren't the same thing as the single[apache-camel]tag. Always be sure to read the descriptions that appear when selecting tags! - Charles