activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sweenma <>
Subject ActiveMQ to Websphere MQ
Date Wed, 31 Mar 2010 15:03:03 GMT

I am new to ActiveMQ and Q'ing in general, so I will do my best to explain
the issue and ask for your patience. I followed the suggestions of many
postings on how to get ActiveMQ to forward msg's to Websphere MQ using
camel. I got it to work, however the amount of time it takes to forward the
msg from ActiveMQ to Websphere MQ is very high, around 2 secs. I enabled the
logging and I noticed that it appears that the communication between
ActiveMQ and WebSphere MQ runs 1 thread at a time. For example, I have a
simple multithreaded producer that puts msg's in to the ActiveMQ. ActiveMQ
is configured to forward the msg's to WebSphere MQ and then I have a simple
MDB listener to read the msg's from the WebSphere MQ. With logging enabled I
can see a msg being processed by a thread and then another msg being
processed by another thread after the first thread completes. Here is a
samle of the log:

2010-03-31 08:32:44,743 [DefaultMessageListenerContainer-29]
org.apache.activemq.ActiveMQMessageConsumer - ID:WNJ10002LDVSBAG
-1559-1270038729745-2:0:1:1 received message: MessageDispatch {commandId =
0, responseRequired = false, consumerId =

lots of other log entries with the same thread id
DefaultMessageListenerContainer-29 followed by the next msg log entry:
2010-03-31 08:32:46,539 [DefaultMessageListenerContainer-30]
org.apache.activemq.ActiveMQMessageConsumer - ID:WNJ10002LDVSBAG
-1559-1270038729745-2:0:1:1 received message: MessageDispatch {commandId =
0, responseRequired = false, consumerId =

and so on for each msg that was put into the ActiveMQ queue. I noticed that
the ID for each ActiveMQMessageConsumer is the same, however I am not sure
if this is relavant or not. 
I am using activemq V5.2.0I with Java V1.5. I pasted a copy of the
activemq.xml file below. I am really stuck here and would appreciate any
help. TIA.


    <!-- Allows us to use system properties as variables in this
configuration file -->
         <property name="locations">

    <broker xmlns=""
brokerName="mylaptop" persistent="false"
dataDirectory="${activemq.base}/data" useJmx="false">    

        <!-- Destination specific policies using destination names or
wildcards -->
                    <policyEntry queue=">" memoryLimit="5mb"/>
                    <policyEntry topic=">" memoryLimit="5mb">
                      <!-- you can add other policies too such as these

            <queue name="testRIMQ" physicalName="RIMQ" />

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
            <managementContext createConnector="false"/>

        <!-- The store and forward broker networks ActiveMQ will listen to

            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" indexPageSize="16kb"

            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
        <!--  The maximum about of space the broker will use before slowing
down producers -->
                    <memoryUsage limit="20 mb"/>
                    <storeUsage limit="1 gb" name="foo"/>
                    <tempUsage limit="100 mb"/>

        <!-- The transport connectors ActiveMQ will listen to -->
            <transportConnector name="openwire" uri="tcp://localhost:61616"


    <camelContext id="camel"
            <from uri="activemq:RIMQ"/> 
            <to uri="webspheremq:queue:DVST.TEST.QUEUE"/> 

    <bean id="remoteBroker"
class="org.apache.activemq.camel.component.ActiveMQComponent" >
        <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <property name="brokerURL"
value="failover:(tcp://host:port)?maxReconnectAttempts=0" />

    <bean id="webspheremq"
        <property name="configuration">
            <bean class="org.apache.camel.component.jms.JmsConfiguration"> 
                <property name="connectionFactory"> 
                    <bean class=""> 
                        <property name="hostName" value="...."/> 
                        <property name="port" value="1...."/> 
                        <property name="queueManager" value="Q1T2"/> 
                        <property name="channel"
                        <property name="transportType" value="1"/> 

    <!-- An embedded servlet engine for serving up the Admin console -->
    <jetty xmlns="">
            <nioConnector port="8161"/>

            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>

    <!--  This xbean configuration file supports all the standard spring xml
configuration options -->


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message