Activemq 不以 HTTP uri 开头
Activemq Not Starting with HTTP uri
我将 activemq 与 camel 一起使用,以使用来自队列的消息并将它们发送到 http 服务器。我正在使用以下骆驼配置:-
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq:queue:Consumer.A.VirtualTopic.Orders"/>
<to uri="http://localhost:8080/" />
<!-- <to uri="file:///Users/vinod/activemq.txt"/> -->
<!-- <to uri="activemq:queue:sssss"/> -->
</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://localhost?create=false"/>
</bean>
</property>
</bean>
在第一个块中创建一个路由,其中来自 activemq:queue:Consumer.A.VirtualTopic.Orders
的消费者消息排队并将它们发送到位于 http://localhost:8080/
的服务器。其他两个评论的目的地工作正常,但是当我使用上述配置启动 activemq 以通过 http 发送消息时,服务器停止而不抛出任何错误消息。 Activemq 日志为 https://gist.github.com/kumar003vinod/1e5944cb246edb74c47fef7a0b433387
请提供一些见解。
确保在 ActiveMQ lib/camel
目录中包含 camel-http
和 camel-http-common
JAR。您可能还需要在该目录中包含来自 camel-http
的传递依赖项,以便 ActiveMQ 在其类路径中包含所有需要的 JAR。
那将是 commons-httpclient
和 commons-codec
JAR,但我认为它们已经包含在 lib/optional
.
中
我将 activemq 与 camel 一起使用,以使用来自队列的消息并将它们发送到 http 服务器。我正在使用以下骆驼配置:-
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq:queue:Consumer.A.VirtualTopic.Orders"/>
<to uri="http://localhost:8080/" />
<!-- <to uri="file:///Users/vinod/activemq.txt"/> -->
<!-- <to uri="activemq:queue:sssss"/> -->
</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://localhost?create=false"/>
</bean>
</property>
</bean>
在第一个块中创建一个路由,其中来自 activemq:queue:Consumer.A.VirtualTopic.Orders
的消费者消息排队并将它们发送到位于 http://localhost:8080/
的服务器。其他两个评论的目的地工作正常,但是当我使用上述配置启动 activemq 以通过 http 发送消息时,服务器停止而不抛出任何错误消息。 Activemq 日志为 https://gist.github.com/kumar003vinod/1e5944cb246edb74c47fef7a0b433387
请提供一些见解。
确保在 ActiveMQ lib/camel
目录中包含 camel-http
和 camel-http-common
JAR。您可能还需要在该目录中包含来自 camel-http
的传递依赖项,以便 ActiveMQ 在其类路径中包含所有需要的 JAR。
那将是 commons-httpclient
和 commons-codec
JAR,但我认为它们已经包含在 lib/optional
.