JMS 桥接与远程代理
使用 ActiveMQ Classic > 用户提交的配置 > JMS 桥接与远程代理
此配置示例展示了如何使用 BridgeConnector 连接到远程 ActiveMQ Classic 代理。
<beans>
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker useJmx="true" persistent="false" xmlns="http://activemq.org/config/1.0"
brokerName="localhost" dataDirectory="${activemq.base}/data">
<jmsBridgeConnectors>
<jmsQueueConnector outboundQueueConnectionFactory="#remoteBroker">
<inboundQueueBridges>
<inboundQueueBridge
inboundQueueName = "queue.ping"
localQueueName = "queue.incomingMsgs.ping"
selector = "JMSType LIKE 'foo%'"/>
</inboundQueueBridges>
<outboundQueueBridges>
<outboundQueueBridge
outboundQueueName = "queue.pong"
localQueueName = "queue.incomingMsgs.ping"
selector = "JMSType LIKE 'foo%'"/>
</outboundQueueBridges>
</jmsQueueConnector>
</jmsBridgeConnectors>
</broker>
<!-- JMS ConnectionFactory to use for remote bridging -->
<bean id="remoteBroker" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="failover:(tcp://remote_activemq:61616)" />
</bean>
</beans>