camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal <>
Subject setting JMSXGroupId property from within a processor
Date Wed, 27 Feb 2008 06:24:26 GMT

I am trying to set the JMXGroupId property from within a processor using the
following code.  
which doesn't work.

I also tried to get hold of the underlying JMSMessage by casting the Message
object, but the underlying JMS message object is null. 
		Message outMessage = exchange.getOut();
		JmsMessage jmsOutMessage = (JmsMessage) outMessage;
		javax.jms.Message underlyingMessage = jmsOutMessage.getJmsMessage();
		System.out.println("underlyingMessage" + underlyingMessage);

The requirement is to extract information from the message and set it as a
JMSXGroupID.  We don't have control over the producer.  We are using
ActiveMQ, with Camel embedded within the broker.  

The following is my camel context configuration
<camelContext xmlns="">
	        <from uri="activemq:testQ-input"/>
		<process ref="groupIdInsertionProcessor"/>
		<to uri="activemq:testQ-output"/>

<bean id="groupIdInsertionProcessor" class="xx.GroupIdInsertionProcessor"/>

public class GroupIdInsertionProcessor implements Processor {
	public void process(Exchange exchange) throws Exception {
		Message inMessage = exchange.getIn();

Thanks for the help.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message