I'm trying to use the ActiveMQ Message Groups technology, but have been
unable to get the JMSXGroupID value set. I have inbound HTTP messages that
go to a queue for processing. I need the consumers of this queue to be
single threaded for a given subset of messages...
I've tried 3 different approaches, but each time when I look in JMX at the
messages in queue test2...the JMSXGroupID is always null...
//approach #1
from("activemq:test1")
.setHeader("JMSXGroupID", "testID"))
.to(activemq:test2");
//approach #2
@Produce(uri = "activemq:test2")
ProducerTemplate producer;
@Consume(uri = "jetty:http://0.0.0.0:9000/inbound/")
@InOnly
public void onMessage(String msg)
{
producer.sendBodyAndHeader(msg,"JMSXGroupID","testID");
}
//approach #3
from("activemq:test1")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
Message inMessage = exchange.getIn();
exchange.getOut().copyFrom(inMessage);
exchange.getOut().setHeader("JMSXGroupID","testID");
}
.to(activemq:test2");
Is there something else I need to do to use this feature? Does JMX console
not display this value correctly?
note - I'm using SMX 3.3.1 and Camel 1.6.1...
thanks...
-----
Ben - Senior Consultant
--
View this message in context:
http://www.nabble.com/unable-to-set-JMSXGroupID-using-ServiceMix-Camel-tp25249635p25249635.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.