activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From darickard <>
Subject jms to jms bridge (to JBoss MQ)
Date Fri, 22 Aug 2008 18:02:23 GMT

I've been trying to create a config file (activemq.xml) for the following
setup, but I just can't seem to get it to work. I can get messages on the
queue, but they're not getting bridged to JBoss MQ. I've read and re-read
the help on, I looked over
the test cases that come with the source distro, and I've searched and read
a lot of postings on the forum, but just can't seem to get it right. Can
someone please give me a hand?


- ActiveMQ 5.1
- Standalone Java 1.6 app.
- Want to have an embedded ActiveMQ broker so that I can put things on its
queue using the vm://brokerName syntax. The messages should be persisted
locally - the default kaha method is fine, no rdbms needed. I was able to
config this broker okay and I have code that can successfully put messages
on its queue.
- Want all messages that are enqueued to the embedded broker's queue to be
forwarded to an instance of JBoss MQ (JBoss 4.0.3) running on a different
server. This is the part I was not able to get working.
- Want ActiveMQ to handle the loss of connectivity to JBoss MQ gracefully.
If JBoss goes down or the connection is temporarily lost (it's over a WAN
connection), ActiveMQ should handle that for my app so I can continue to use
the ActiveMQ queue with no impact and my messages will eventually make it to
the JBoss queue when it's again available.

Any help or assistance would be greatly appreciated!


My current (not working) activemq.xml file:
<?xml version="1.0" encoding="UTF-8"?>

    This is the main broker. Put messages here to get them relayed. The uri
    access this broker from within the JVM is vm://mainBroker.
    <bean id="mainBroker" class=""
init-method="start" destroy-method="stop">
        <property name="brokerName" value="mainBroker"/>
        <property name="persistent" value="false"/>
        <property name="transportConnectorURIs">

        <property name="jmsBridgeConnectors">
              <ref bean="jmsQueueConnector"/>
    <!-- the jms queue connector "A Bridge to other JMS Queue providers" -->
   <bean id="jmsQueueConnector"
      <property name="name" value="jmsQueueBridge"/>
      <property name="jndiOutboundTemplate" ref="remoteJndi"/>
      <property name="outboundQueueConnectionFactoryName"
      <property name="outboundQueueBridges">
            <ref bean="outboundQueueJbossBridge" />

    <!-- jndi template -->
  <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
        <prop key="java.naming.provider.url">jnp://</prop>

    <!-- outbound queue -->
   <bean id="outboundQueueJbossBridge"
      <property name="outboundQueueName" value="queue/JobRequestQueue"/>


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

View raw message