我很新的这个话题,需要一些解释...新手:ActiveMQ的骆驼
我们有一个正在运行的ActiveMQ-Server,它现在应该与Apache骆驼路由和处理增强。我们的整个配置是基于XML的。
我的第一种方法是在我们的activemq.xml文件末尾做一个普通的<import resource="camel.xml">
,但这似乎是错误的路径。
这些都是当前transortConnectors:
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://localdev:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://localdev:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://localdev:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://localdev:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://localdev:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt+ws" uri="ws://localdev:1884?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="vm" uri="vm://localdev" />
</transportConnectors>
这是我们camel.xml:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<camelContext id="camel" depends-on="broker-localdev" xmlns="http://camel.apache.org/schema/spring">
<route id="devRawMap">
<description>Redirect for test message</description>
<from uri="activemq:topic:alpha.topic.DEV.INTERNAL.*.RAW"/>
<to uri="activemq:queue:alpha.queue.DEV"/>
</route>
<route id="liveMap">
<description>Redirect for Live data</description>
<from uri="activemq:topic:devRoot.topic.LIVE.*.RAW"/>
<to uri="activemq:queue:devRoot.queue.LIVE"/>
</route>
</camelContext>
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://localdev?create=false"/>
<property name="userName" value="user"/>
<property name="password" value="pass"/>
</bean>
</property>
</bean>
</beans>
无论配置我做,该消息将不会从话题路由排队,我也得到了日志消息:
Broker localhost not started so using localdev instead
Connector vm://localhost started
我按照这个错误的方法吗?
任何帮助,高度赞赏
[编辑01]
是问题也许在很多的持久性主题beingh从kahadb alogn配置采用RuntimeConfigurationPlugin有? 需要一段时间才能加载和创建所有主题,尤其是将log4j设置为调试。 此外,RuntimeConfigurationPlugin需要代理在初始化期间设置“start = false”。看到here
你可以试一下' '?另外,请尝试启用完整的调试日志记录,以查看是否可以提取更多的 信息。 –
Lucky
你正在使用哪个版本的骆驼。当你启动应用程序时,在你的activemq上创建队列? – pvpkiran
嗨,所有队列和主题都已创建。我可以从外部nodejs脚本发送给他们,也可以通过stomp连接读取队列。但是当我启动Camel时,我在日志vm:// localhost中看到正在创建。 – MPH