与本地代理的 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="#localBroker">
<inboundQueueBridges>
<inboundQueueBridge
inboundQueueName = "queue.ping"
localQueueName = "queue.incomingMsgs.ping"
selector = "JMSType LIKE 'foo%'"/>
</inboundQueueBridges>
<outboundQueueBridges>
<outboundQueueBridge
localQueueName = "queue.incomingMsgs.ping"
outboundQueueName = "queue.pong"
selector = "JMSType LIKE 'foo%'"/>
</outboundQueueBridges>
</jmsQueueConnector>
</jmsBridgeConnectors>
</broker>
<!-- JMS ConnectionFactory to use for local bridging -->
<bean id="localBroker" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://127.0.0.1:61616" />
</bean>
</beans>