我正在开发一个解决方案,其架构是:
PHP -> JMS -> Camel -> several web services and endpoints.
Run Code Online (Sandbox Code Playgroud)
根据:http://activemq.apache.org/php.html
...我应该使用PHP STOMP客户端来使用JMS.这很好用.
我还使用ActiveMQ STOMP Java客户端从JMS接收.
但是,我想使用Camel来路由JMS消息.我似乎无法让Camel与JMS/Stomp合作.
我看了一下https://github.com/fusesource/stompjms
...但我不知道如何与Camel合作.
我还尝试使用一个指定STOMP的brokerURL的Spring camel-context.xml:
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="stomp://localhost:61613" />
<property name="userName" value="admin" />
<property name="password" value="AmChamDev" />
</bean>
</property>
</bean>
Run Code Online (Sandbox Code Playgroud)
......但是,这会导致:
[ #0 - JmsConsumer[/queue/test]] ultJmsMessageListenerContainer WARN Could not
refresh JMS Connection for destination '/queue/test' - retrying in 5000 ms.
Cause: Could not create Transport.
Reason: java.io.IOException: Transport scheme NOT recognized: …Run Code Online (Sandbox Code Playgroud)