とActiveMQの私は、このトピックにかなり新たなんだといくつかの説明が必要...初心者:キャメル
我々は今、Apacheのキャメルのルーティングおよび処理を強化する必要があります実行しているのActiveMQ-サーバーを持っています。私たちの全体の構成は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
私はこれに間違ったアプローチをしていますか?
すべてのヘルプは非常に
を高く評価している[EDIT 01]
は永続化された話題の多くを有することを多分問題ですRuntimeConfigurationPluginを使用してkahadb alognからロードbeingh? すべてのトピックがロードされ、作成されるまでには時間がかかります。特に、log4jをデバッグに設定する必要があります。 さらに、RuntimeConfigurationPluginでは、ブローカがinit中に "start = false"を設定する必要があります。 <import resource="camel.xml"/>
を除去してactivemq.xml
に直接camel.xml
のコンテンツを追加することにより、
</broker>
<import resource="camel.xml"/>
</beans>
試み:camel.xml
がactivemq.xml
と同じフォルダ内にある場合here
あなたは ' 'を試すことができますか?また、完全なデバッグログを有効にして、 情報をさらに抽出できるかどうかを確認してください。 –
Lucky
あなたはどのバージョンのラクダを使用していますか?アプリケーションを起動すると、activemqでキューが作成されますか? – pvpkiran
こんにちはすべてのキューとトピックが作成されます。私は外部nodejsスクリプトからstomp接続を介してキューを読むこともできます。しかし、私がCamelを始める瞬間、ログにはvm:// localhostが作成されているのが見えます。 – MPH