-
1. Re: Losing messages when trying to implement priority queues with camel fil
davsclaus Jul 15, 2009 4:44 AM (in response to romsrini)Hi
Can you provide more details such as
- ActiveMQ version used
- Camel version used
- Example of your Camel route
- And example how you publish your messages to the queue using different priority
-
2. Re: Losing messages when trying to implement priority queues with camel filters
romsrini Jul 15, 2009 12:24 PM (in response to romsrini)I'm using ActiveMQ version 5.2, and Camel version 1.6.0
My Camel route is :
from("jms:queue:testMsgsQ?concurrentConsumers=" + 1 + "&cacheLevel=3").filter(header("JMSPriority").isGreaterThan(2)).beanRef("allTestConsumer", "doSomething");
from("jms:queue:testMsgsQ?concurrentConsumers=" + 1 + "&cacheLevel=3").filter(header("JMSPriority").isGreaterThan(6)).beanRef("testConsumer", "doSomething");
I'm publishing the messages using the ActiveMQ web admin tool (http://localhost:8161/admin/queues.jsp)
I'm wondering if I need to use the Queue selector instead of a consumer filter?
-
3. Re: Losing messages when trying to implement priority queues with camel fil
davsclaus Jul 15, 2009 1:48 PM (in response to romsrini)Yes you should as the Filter you are using is the Filter EIP
http://camel.apache.org/message-filter.html
In which unwanted messages gets dropped.
What you are looking for is on the JMS consumer to select which messages the consumer should receive.
So look into how to do that in ActiveMQ.
-
4. Re: Losing messages when trying to implement priority queues with camel filters
romsrini Jul 15, 2009 2:11 PM (in response to romsrini)Thanks. I've mostly got it working using the following routes:
from("jms:queue:testMsgsQ?concurrentConsumers=" + 1 + "&cacheLevel=3&selector=JMSPriority>3").beanRef("allTestConsumer", "doSomething");
from("jms:queue:testMsgsQ?concurrentConsumers=" + 1 + "&cacheLevel=3&selector=JMSPriority>6").beanRef("testConsumer", "doSomething");