camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JavaRat <>
Subject Bridging the ActiveMQ with IBM Websphere using Camel
Date Tue, 23 Sep 2008 08:28:47 GMT

Camel seems too be a most interesting and promising keycomponent in our work
and we have thrown ourselves into trying its potentials. However while
trying to bridge an ActiveMQqueue with an IBM MQ websphere queue we have
discovered the following problem (please see attached picture). camelissue.jpeg 

Messages taken off the Active MQ queue and delivered onto the IBM MQ
Websphere queue which is good and what we want. However the messages will
not have the specific parameters set in the JMS header and it’s payload
Hopefully this is an error from our part but without success we have tried
to locate the faulty code and are now turning too this forum for any advice
or pointers where we are going wrong. (It might be worth mentioning that
this code has worked for us previously using the Servicemix-JMS-Component
which we have tried adapting in the camel approach.)

Our setup is as follows:

<camelContext id="camel"

<bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="">
<property name="transportType">
<util:constant staticfield=""/> 
<property name="queueManager" value="QMgr"/>
<property name="hostName" value=""/>     
<property name="port" value="1414"/>

<bean id="activemq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://" />
public class MyRouteBuilder extends RouteBuilder {

public void configure() {
from("").process(new Processor() {
public void process(Exchange exchange) throws Exception {
JmsMessage inMsg = null;

if (exchange.getIn() instanceof JmsMessage) {
inMsg = (JmsMessage)exchange.getIn();
javax.jms.Message inMsgMsg = inMsg.getJmsMessage();

if (inMsgMsg instanceof ActiveMQTextMessage) {
ActiveMQTextMessage inTextMsg = (ActiveMQTextMessage)inMsgMsg;
inMsgMsg.setStringProperty("JMS_IBM_Format", MQC.MQFMT_STRING);
inMsgMsg.setIntProperty("JMS_IBM_MsgType", MQC.MQMT_REQUEST);
else {
System.out.println("inMsgMsg not a ActiveMQTextMessage but a " +

else {
System.out.println("inMsg not a JmsMessage but a " +



A search through forums provided some related clues what might be a problem
in this case???

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

View raw message