10.3. Native ActiveMQ JMS-to-JMS Bridge (Deprecated)
10.3.1. Embedded Native Configuration
Overview
Spring configuration
jmsBridgeConnectors
element, which can contain any number of jmsQueueConnector
elements and jmsTopicConnector
elements. The detailed configuration of the bridge is described in the following sections.
Example 10.2. Embedded native JMS-to-JMS Bridge
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" ... > ... <broker xmlns="http://activemq.apache.org/schema/core" id="localbroker" brokerName="localBroker" persistent="false"> <jmsBridgeConnectors> <jmsQueueConnector> ... </jmsQueueConnector> ... <jmsTopicConnector> ... </jmsTopicConnector> ... </jmsBridgeConnectors> <transportConnectors> <transportConnector uri="tcp://localhost:61234" /> </transportConnectors> </broker> ... </beans>
Router rules
Figure 10.2. Routing Rules in the JMS-to-JMS Bridge
Rule types
- Inbound queue-to-queue mapping—defines a rule for pulling messages off a queue in the third-party JMS provider and forwarding the messages to a queue (possibly with a different name) in the ActiveMQ broker.
- Outbound queue-to-queue mapping—defines a rule for pulling messages off a queue in the ActiveMQ broker and forwarding the messages to a queue (possibly with a different name) in the third-party JMS provider.
- Inbound topic-to-topic mapping—defines a rule for receiving messages from a topic in the third-party JMS provider and forwarding the messages to a topic (possibly with a different name) in the ActiveMQ broker.
- Outbound topic-to-topic mapping—defines a rule for receiving messages from a topic in the ActiveMQ broker and forwarding the messages to a topic (possibly with a different name) in the third-party JMS provider.
10.3.2. Connecting to the ActiveMQ Broker
Bootstrapping an embedded bridge
Non-embedded deployments
jmsQueueConnector
supports various attributes (localQueueConnection
, localQueueConnectionFactory
, and so on), which you can use to configure the ActiveMQ broker connection explicitly. Likewise, the jmsTopicConnector
element supports attributes for configuring an ActiveMQ broker connection explicitly. This type of deployment lies beyond the scope of the current guide. We recommend that you use an embedded deployment of the native JMS-to-JMS bridge.
10.3.3. Connecting to the Third-Party JMS Provider
Overview
Reference a connection factory bean
javax.jms.QueueConnectionFactory
instance directly as a Spring bean. You can then reference this bean from the native JMS-to-JMS bridge by setting the outboundQueueConnectionFactory
attribute of the jmsQueueConnector
element.
<beans ... > ... <broker xmlns="http://activemq.apache.org/schema/core" ... > <jmsBridgeConnectors> <jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory"> ... </jmsQueueConnector> </jmsBridgeConnectors> ... </broker> ... <!-- Configure IBM WebSphere MQ queue connection factory --> <bean id="remoteFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="transportType" value="1"/> <property name="hostName" value="localhost"/> <property name="port" value="1414"/> <property name="queueManager" value="QM_TEST"/> </bean> ... </beans>
jmsTopicConnector
element by setting the outboundTopicConnectionFactory
attribute to reference a javax.jms.TopicConnectionFactory
instance.
Look up a connection factory in JNDI
javax.jms.QueueConnectionFactory
instance in a JNDI directory (assuming that some administrative tool has already instantiated and registered the connection factory in JNDI).
<beans ... > ... <broker xmlns="http://activemq.apache.org/schema/core" ... > <jmsBridgeConnectors> <jmsQueueConnector jndiOutboundTemplate="#remoteJndi" outboundQueueConnectionFactoryName="cn=MQQueueCF"> ... </jmsQueueConnector> </jmsBridgeConnectors> ... </broker> ... <!-- Configure a Spring JNDI template instance --> <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial"> com.sun.jndi.ldap.LdapCtxFactory </prop> <prop key="java.naming.provider.url"> ldap://server.company.com/o=company_us,c=us </prop> </props> </property> </bean> ... </beans>
jndiOutboundTemplate
attribute references an org.springframework.jndi.JndiTemplate
bean instance, which is a Spring wrapper class that configures a JNDI directory. In this example, the JNDI directory is LDAP based, so the JndiTemplate
bean is configured with the URL for connecting to the LDAP server. The outboundQueueConnectionFactoryName
attribute specifies a query on the LDAP server, which should return a javax.jms.QueueConnectionFactory
instance.
10.3.4. Configuring Queue Bridges
Overview
inboundQueueBridges
element and the outboundQueueBridges
element. Using these elements, you can specify which queues to bridge between the third-party JMS provider and the ActiveMQ broker.
Inbound queue bridges
inboundQueueBridges
element and the inboundQueueBridge
child elements are used to route queue messages from the third-party JMS provider to the ActiveMQ broker. In this case, inbound means heading into the ActiveMQ broker.
<inboundQueueBridges> <inboundQueueBridge inboundQueueName="QueueA" /> </inboundQueueBridges>
QueueA
queue on the third-party JMS provider and pushes the messages on to the QueueA
queue on the ActiveMQ broker.
<inboundQueueBridges> <inboundQueueBridge inboundQueueName="QueueA" localQueueName="org.activemq.example.QueueA" /> </inboundQueueBridges>
inboundQueueName
specifies the name of the queue on the third-party JMS provider and localQueueName
specifies the name of the queue on the ActiveMQ broker.
Outbound queue bridges
outboundQueueBridges
element and the outboundQueueBridge
child elements are used to route queue messages from the ActiveMQ broker to the third-party JMS provider. In this case, outbound means heading away from the ActiveMQ broker.
<outboundQueueBridges> <outboundQueueBridge outboundQueueName="QueueX" /> </inboundQueueBridges>
QueueX
queue on the ActiveMQ broker and pushes the messages on to the QueueX
queue on the third-party JMS provider.
<outboundQueueBridges> <outboundQueueBridge outboundQueueName="QueueX" localQueueName="org.activemq.example.QueueX" /> </inboundQueueBridges>
outboundQueueName
specifies the name of the queue on the third-party JMS provider and localQueueName
specifies the name of the queue on the ActiveMQ broker.
Sample queue bridges
QueueA
, QueueB
, and QueueC
, and three outbound queues, QueueX
, QueueY
, and QueueZ
.
Example 10.3. Sample Queue Bridges
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" ... > ... <broker xmlns="http://activemq.apache.org/schema/core" ... > <jmsBridgeConnectors> <jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory"> <inboundQueueBridges> <inboundQueueBridge inboundQueueName="QueueA" /> <inboundQueueBridge inboundQueueName="QueueB" /> <inboundQueueBridge inboundQueueName="QueueC" /> </inboundQueueBridges> <outboundQueueBridges> <outboundQueueBridge outboundQueueName="QueueX" /> <outboundQueueBridge outboundQueueName="QueueY" /> <outboundQueueBridge outboundQueueName="QueueZ" /> </outboundQueueBridges> </jmsQueueConnector> </jmsBridgeConnectors> <transportConnectors> <transportConnector uri="tcp://localhost:61234" /> </transportConnectors> </broker> ... </beans>
10.3.5. Configuring Topic Bridges
Overview
inboundTopicBridges
element and the outboundTopicBridges
element. Using these elements, you can specify which topics to bridge between the third-party JMS provider and the ActiveMQ broker.
Inbound topic bridges
inboundTopicBridges
element and the inboundTopicBridge
child elements are used to route topic messages from the third-party JMS provider to the ActiveMQ broker. In this case, inbound means heading into the ActiveMQ broker.
<inboundTopicBridges> <inboundTopicBridge inboundTopicName="TopicA" /> </inboundTopicBridges>
TopicA
topic on the third-party JMS provider and pushes the messages on to the TopicA
topic on the ActiveMQ broker.
<inboundTopicBridges> <inboundTopicBridge inboundTopicName="TopicA" localTopicName="org.activemq.example.TopicA" /> </inboundTopicBridges>
inboundTopicName
specifies the name of the topic on the third-party JMS provider and localTopicName
specifies the name of the topic on the ActiveMQ broker.
Outbound topic bridges
outboundTopicBridges
element and the outboundTopicBridge
child elements are used to route topic messages from the ActiveMQ broker to the third-party JMS provider. In this case, outbound means heading away from the ActiveMQ broker.
<outboundTopicBridges> <outboundTopicBridge outboundTopicName="TopicX" /> </inboundTopicBridges>
TopicX
topic on the ActiveMQ broker and pushes the messages on to the TopicX
topic on the third-party JMS provider.
<outboundTopicBridges> <outboundTopicBridge outboundTopicName="TopicX" localTopicName="org.activemq.example.TopicX" /> </inboundTopicBridges>
outboundTopicName
specifies the name of the topic on the third-party JMS provider and localTopicName
specifies the name of the topic on the ActiveMQ broker.
Sample topic bridges
TopicA
, TopicB
, and TopicC
, and three outbound topics, TopicX
, TopicY
, and TopicZ
.
Example 10.4. Sample Topic Bridges
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" ... > ... <broker xmlns="http://activemq.apache.org/schema/core" ... > <jmsBridgeConnectors> <jmsTopicConnector outboundTopicConnectionFactory="#remoteFactory"> <inboundTopicBridges> <inboundTopicBridge inboundTopicName="TopicA" /> <inboundTopicBridge inboundTopicName="TopicB" /> <inboundTopicBridge inboundTopicName="TopicC" /> </inboundTopicBridges> <outboundTopicBridges> <outboundTopicBridge outboundTopicName="TopicX" /> <outboundTopicBridge outboundTopicName="TopicY" /> <outboundTopicBridge outboundTopicName="TopicZ" /> </outboundTopicBridges> </jmsTopicConnector> </jmsBridgeConnectors> <transportConnectors> <transportConnector uri="tcp://localhost:61234" /> </transportConnectors> </broker> ... </beans>
10.3.6. Deploying a Bridge
Overview
Deploy the Third-Party Client Libraries
wrap:
URL prefix.
foo-jms-client.jar
located in the /tmp
directory, you could deploy it into the OSGi container as follows:
JBossA-MQ:karaf@root> osgi:install -s wrap:file:///tmp/foo-jms-client.jar
wrap:
prefix.
Deploy the Bridge
InstallDir/etc/activemq.xml
file, and insert the jmsBridgeConnectors
element as a child of the broker
element, as follows:
<beans ... > <!-- Allows us to use system properties and fabric as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="properties"> <bean class="io.fabric8.mq.fabric.ConfigurationProperties"/> </property> </bean> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" start="false"> ... <jmsBridgeConnectors> <jmsQueueConnector> ... </jmsQueueConnector> ... <jmsTopicConnector> ... </jmsTopicConnector> ... </jmsBridgeConnectors> ... </broker> </beans>
10.3.7. Sample Bridge Configuration
Overview
ActiveMQ-to-WebSphere MQ bridge
InstallDir/etc/activemq.xml
file.
Example 10.5. ActiveMQ-to-WebSphere MQ Configuration
<beans ... > <!-- Allows us to use system properties and fabric as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="properties"> <bean class="io.fabric8.mq.fabric.ConfigurationProperties"/> </property> </bean> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" start="false"> ... <jmsBridgeConnectors> <jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory"> <inboundQueueBridges> <inboundQueueBridge inboundQueueName="QueueA" /> </inboundQueueBridges> <outboundQueueBridges> <outboundQueueBridge outboundQueueName="QueueX" /> </outboundQueueBridges> </jmsQueueConnector> </jmsBridgeConnectors> ... </broker> ... <!-- Configure IBM WebSphere MQ queue connection factory --> <bean id="remoteFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="transportType" value="1"/> <property name="hostName" value="localhost"/> <property name="port" value="1414"/> <property name="queueManager" value="QM_TEST"/> </bean> ... </beans>
QueueA
queue and a QueueX
queue on the WebSphere MQ server. ActiveMQ will create the corresponding queues dynamically—there is no need to create them in advance.
Deploying the WebSphere MQ client libraries
$MQ_INSTALL_DIR/java/lib/OSGI
com.ibm.mq.osgi.directip_7.0.1.3.jar com.ibm.msg.client.osgi.commonservices.j2se_7.0.1.3.jar com.ibm.msg.client.osgi.jms.prereq_7.0.1.3.jar com.ibm.msg.client.osgi.jms_7.0.1.3.jar com.ibm.msg.client.osgi.nls_7.0.1.3.jar com.ibm.msg.client.osgi.wmq.nls_7.0.1.3.jar com.ibm.msg.client.osgi.wmq.prereq_7.0.1.3.jar com.ibm.msg.client.osgi.wmq_7.0.1.3.jar
install
commands:
JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.mq.osgi.directip_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.commonservices.j2se_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.jms.prereq_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.jms_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.nls_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.wmq.nls_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.wmq.prereq_7.0.1.3.jar JBossA-MQ:karaf@root> osgi:install -s file:/tmp/mqclient/com.ibm.msg.client.osgi.wmq_7.0.1.3.jar
10.3.8. Handling ReplyTo Destinations
Overview
ReplyTo destinations
JMSReplyTo
header, which specifies the Destination (Queue or Topic) on which the sender expects to receive a reply.
Automatic proxification
JMSReplyTo
header, a corresponding rule must be put in place to ensure that the reply message is propagated back through the bridge. In general, the most effective approach is for the bridge to create the required rule dynamically, whenever a JMSReployTo
header is encountered.
M1
, where the ReplyTo destination is a queue named ReplyA
.
Figure 10.3. Automatic Proxification in the native JMS-to-JMS Bridge
10.3.9. Implementing Message Convertors
Overview
- Inbound message convertor—converts third-party JMS messages to ActiveMQ messages.
- Outbound message convertor—converts ActiveMQ messages to third-party JMS messages.
JmsMessageConvertor interface
JmsMessageConvertor
interface, which can be used as the basis for implementing either an inbound message convertor or an outbound message convertor.
Example 10.6. JmsMessageConvertor interface
package org.apache.activemq.network.jms; import javax.jms.Connection; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; /** * Converts Message from one JMS to another */ public interface JmsMesageConvertor { Message convert(Message message) throws JMSException; Message convert(Message message, Destination replyTo) throws JMSException; void setConnection(Connection connection); }
Message converter methods
JmsMesageConvertor
interface exposes the following methods:
Message convert(Message message)
- This variant of the
convert
method is called, if thedoHandleReplyTo
option is set tofalse
or if theReplyTo
destination on the message isnull
. In this case, theconvert
method should simply reformat the message content as required. Message convert(Message message, Destination replyTo)
- This variant of the
convert
method is called, if theReplyTo
destination on the message is non-null. In this case, in addition to reformatting the message, you have the ability to change thereplyTo
destination, so that the reply to this message is redirected to a different destination.ThereplyTo
argument contains the original destination of the message. If you want to change the ReplyTo destination, you can do so by calling themessage.setJMSReplyTo()
method, passing in the changed destination.The reason you might want to change the ReplyTo destination is in order to take control of proxification (see Section 10.3.8, “Handling ReplyTo Destinations”). Proxification is necessary, because the ActiveMQ broker is not able to make a direct connection back to the third-party JMS provider. void setConnection(Connection connection)
- Provides a reference to the
javax.jms.Connection
object to which messages will be forwarded. In other words, if this message convertor is used as an inbound message convertor, this connection is the connection to the ActiveMQ broker. If this message convertor is used as an outbound message convertor, this connection is the connection to the third-party JMS provider.
Sample implementation
Example 10.7. Sample Message Convertor
package org.apache.activemq.network.jms; import javax.jms.Connection; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; /** * Converts Message from one JMS to another * * @org.apache.xbean.XBean */ public class SimpleJmsMessageConvertor implements JmsMesageConvertor { public Message convert(Message message) throws JMSException { return message; } public Message convert(Message message, Destination replyTo) throws JMSException { Message msg = convert(message); if (replyTo != null) { msg.setJMSReplyTo(replyTo); } else { msg.setJMSReplyTo(null); } return msg; } public void setConnection(Connection connection) { // do nothing } }
Configuring the message convertor
inboundMessageConvertor
and outboundMessageConvertor
attributes.
SimpleJmsMessageConvertor
implementation both as an inbound message convertor and as an outbound message convertor, you could configure a JMS queue connector as follows:
<jmsBridgeConnectors> <jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory" inboundMessageConvertor="org.apache.activemq.network.jms.SimpleJmsMessageConvertor" outboundMessageConvertor="org.apache.activemq.network.jms.SimpleJmsMessageConvertor"> <inboundQueueBridges> <inboundQueueBridge inboundQueueName="QueueA" /> </inboundQueueBridges> <outboundQueueBridges> <outboundQueueBridge outboundQueueName="QueueX" /> </outboundQueueBridges> </jmsQueueConnector> </jmsBridgeConnectors>
10.3.10. Configuration Reference
Overview
jmsQueueConnector attributes
jmsQueueConnector
element:
id
- Optional beran ID of
xs:ID
type, which could be used to reference this bean. inboundMessageConvertor
- References a bean instance of
org.apache.activemq.network.jms.JmsMesageConvertor
type, which transforms inbound messages from the third-party JMS provider into a format that is suitable for the ActiveMQ broker. jndiLocalTemplate
- References a bean instance of
org.springframework.jndi.JndiTemplate
type, which provides access to a JNDI directory instance. Used in combination with thelocalConnectionFactoryName
attribute to locate a JMSQueueConnectionFactory
instance in a JNDI directory, where this connection factory instance is then used to connect to the local JMS provider (that is, the ActiveMQ broker). jndiOutboundTemplate
- References a bean instance of
org.springframework.jndi.JndiTemplate
type, which provides access to a JNDI directory instance. Used in combination with theoutboundQueueConnectionFactoryName
attribute to locate a JMSQueueConnectionFactory
instance in a JNDI directory, where this connection factory instance is then used to connect to the third-party JMS provider. localClientId
- Sets the ID of the local connection (useful for logging and JMX monitoring).
localConnectionFactoryName
- Specifies the JNDI name of a
QueueConnectionFactory
instance. Used in combination with thejndiLocalTemplate
attribute to connect to the local JMS provider (that is, the ActiveMQ broker). localPassword
- Specifies the password part of the credentials used to log on to the local JMS provider (ActiveMQ broker). Used in combination with the
localUsername
attribute. localQueueConnection
- References a bean of
javax.jms.QueueConnection
type, which is used to connect to the local JMS provider (ActiveMQ broker). localQueueConnectionFactory
- References a bean of
javax.jms.QueueConnectionFactory
type, which is used to connect to the local JMS provider (ActiveMQ broker). localUsername
- Specifies the username part of the credentials used to log on to the local JMS provider (ActiveMQ broker). Used in combination with the
localPassword
attribute. name
- Assigns a name to this
jmsQueueConnector
element (useful for logging and JMX monitoring). outboundClientId
- Sets the ID of the third-party connection (useful for logging and JMX monitoring).
outboundMessageConvertor
- References a bean instance of
org.apache.activemq.network.jms.JmsMesageConvertor
type, which transforms outbound messages from the ActiveMQ broker into a format that is suitable for the third-party JMS provider. outboundPassword
- Specifies the password part of the credentials used to log on to the third-party JMS provider. Used in combination with the
outboundUsername
attribute. outboundQueueConnection
- References a bean of
javax.jms.QueueConnection
type, which is used to connect to the third-party JMS provider. outboundQueueConnectionFactory
- References a bean of
javax.jms.QueueConnectionFactory
type, which is used to connect to the third-party JMS provider. outboundQueueConnectionFactoryName
- Specifies the JNDI name of a
QueueConnectionFactory
instance. Used in combination with thejndiOutboundTemplate
attribute to connect to the third-party JMS provider. outboundUsername
- Specifies the username part of the credentials used to log on to the third-party JMS provider. Used in combination with the
outboundPassword
attribute. preferJndiDestinationLookup
- Specifies whether the connector should first try to find a destination in JNDI before using JMS semantics to create a
Destination
. By default, the connector will first use JMS semantics and then fall back to JNDI look-up. Setting this attribute totrue
reverses that order.
jmsTopicConnector attributes
jmsTopicConnector
element:
id
- Optional bean ID of
xs:ID
type, which could be used to reference this bean. inboundMessageConvertor
- References a bean instance of
org.apache.activemq.network.jms.JmsMesageConvertor
type, which transforms inbound messages from the third-party JMS provider into a format that is suitable for the ActiveMQ broker. jndiLocalTemplate
- References a bean instance of
org.springframework.jndi.JndiTemplate
type, which provides access to a JNDI directory instance. Used in combination with thelocalConnectionFactoryName
attribute to locate a JMSTopicConnectionFactory
instance in a JNDI directory, where this connection factory instance is then used to connect to the local JMS provider (that is, the ActiveMQ broker). jndiOutboundTemplate
- References a bean instance of
org.springframework.jndi.JndiTemplate
type, which provides access to a JNDI directory instance. Used in combination with theoutboundTopicConnectionFactoryName
attribute to locate a JMSTopicConnectionFactory
instance in a JNDI directory, where this connection factory instance is then used to connect to the third-party JMS provider. localClientId
- Sets the ID of the local connection (useful for logging and JMX monitoring).
localConnectionFactoryName
- Specifies the JNDI name of a
TopicConnectionFactory
instance. Used in combination with thejndiLocalTemplate
attribute to connect to the local JMS provider (that is, the ActiveMQ broker). localPassword
- Specifies the password part of the credentials used to log on to the local JMS provider (ActiveMQ broker). Used in combination with the
localUsername
attribute. localTopicConnection
- References a bean of
javax.jms.TopicConnection
type, which is used to connect to the local JMS provider (ActiveMQ broker). localTopicConnectionFactory
- References a bean of
javax.jms.TopicConnectionFactory
type, which is used to connect to the local JMS provider (ActiveMQ broker). localUsername
- Specifies the username part of the credentials used to log on to the local JMS provider (ActiveMQ broker). Used in combination with the
localPassword
attribute. name
- Assigns a name to this
jmsTopicConnector
element (useful for logging and JMX monitoring). outboundClientId
- Sets the ID of the third-party connection (useful for logging and JMX monitoring).
outboundMessageConvertor
- References a bean instance of
org.apache.activemq.network.jms.JmsMesageConvertor
type, which transforms outbound messages from the ActiveMQ broker into a format that is suitable for the third-party JMS provider. outboundPassword
- Specifies the password part of the credentials used to log on to the third-party JMS provider. Used in combination with the
outboundUsername
attribute. outboundTopicConnection
- References a bean of
javax.jms.TopicConnection
type, which is used to connect to the third-party JMS provider. outboundTopicConnectionFactory
- References a bean of
javax.jms.TopicConnectionFactory
type, which is used to connect to the third-party JMS provider. outboundTopicConnectionFactoryName
- Specifies the JNDI name of a
TopicConnectionFactory
instance. Used in combination with thejndiOutboundTemplate
attribute to connect to the third-party JMS provider. outboundUsername
- Specifies the username part of the credentials used to log on to the third-party JMS provider. Used in combination with the
outboundPassword
attribute. preferJndiDestinationLookup
- Specifies whether the connector should first try to find a destination in JNDI before using JMS semantics to create a
Destination
. By default, the connector will first use JMS semantics and then fall back to JNDI look-up. Setting this attribute totrue
reverses that order.
inboundQueueBridge attributes
inboundQueueBridge
element:
doHandleReplyTo
- A boolean attribute that specifies whether ReplyTo messages should be handled or not. Default is
true
. id
- Optional bean ID of
xs:ID
type, which could be used to reference this bean. inboundQueueName
- Specifies the name of the queue in the third-party JMS provider, from which messages are consumed.
localQueueName
- Specifies the local queue name (in the ActiveMQ broker), into which messages are pushed. If not specified, defaults to the same value as
inboundQueueName
. selector
- Optionally, specifies a JMS selector string.
outboundQueueBridge attributes
outboundQueueBridge
element:
doHandleReplyTo
- A boolean attribute that specifies whether ReplyTo messages should be handled or not. Default is
true
. id
- Optional bean ID of
xs:ID
type, which could be used to reference this bean. outboundQueueName
- Specifies the name of the queue in the third-party JMS provider, into which messages are pushed.
localQueueName
- Specifies the local queue name (in the ActiveMQ broker), from which messages are consumed. If not specified, defaults to the same value as
outboundQueueName
. selector
- Optionally, specifies a JMS selector string.
inboundTopicBridge attributes
inboundTopicBridge
element:
consumerName
- If this attribute is set, the bridge creates a durable consumer for this topic.
doHandleReplyTo
- A boolean attribute that specifies whether ReplyTo messages should be handled or not. Default is
true
. id
- Optional bean ID of
xs:ID
type, which could be used to reference this bean. inboundTopicName
- Specifies the name of the topic in the third-party JMS provider, from which messages are consumed.
localTopicName
- Specifies the local topic name (in the ActiveMQ broker), into which messages are pushed. If not specified, defaults to the same value as
inboundTopicName
. selector
- Optionally, specifies a JMS selector string.
outboundTopicBridge attributes
outboundTopicBridge
element:
consumerName
- If this attribute is set, the bridge creates a durable consumer for this topic.
doHandleReplyTo
- A boolean attribute that specifies whether ReplyTo messages should be handled or not. Default is
true
. id
- Optional bean ID of
xs:ID
type, which could be used to reference this bean. outboundTopicName
- Specifies the name of the topic in the third-party JMS provider, into which messages are pushed.
localTopicName
- Specifies the local topic name (in the ActiveMQ broker), from which messages are consumed. If not specified, defaults to the same value as
outboundTopicName
. selector
- Optionally, specifies a JMS selector string.