Which version of Camel are you using BTW? Just wondered if this has
been fixed since 1.2.0 (we so need 1.3.0 to be released! :)

On 27/02/2008, Kamal <[EMAIL PROTECTED]> wrote:
>
>  I am trying to set the JMXGroupId property from within a processor using the
>  following code.
>  exchange.getOut().setHeader("JMSXGroupID",groupId);
>  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="http://activemq.apache.org/camel/schema/spring";>
>           <route>
>                 <from uri="activemq:testQ-input"/>
>                 <process ref="groupIdInsertionProcessor"/>
>                 <to uri="activemq:testQ-output"/>
>           </route>
>  </camelContext>
>
>  <bean id="groupIdInsertionProcessor" class="xx.GroupIdInsertionProcessor"/>
>
>  public class GroupIdInsertionProcessor implements Processor {
>         public void process(Exchange exchange) throws Exception {
>                 Message inMessage = exchange.getIn();
>                 
> exchange.getOut().setHeader("JMSXGroupID",inMessage.getBody());
>         }
>  }
>
>
>  Thanks for the help.
>
>  Regards,
>  Kamal
>
> --
>  View this message in context: 
> http://www.nabble.com/setting-JMSXGroupId-property-from-within-a-processor-tp15706825s22882p15706825.html
>  Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to