0

activemq.apache.orgのガイドラインに従うと、トランスポートプロトコルとしてopenwireを使用して起動して実行するのはかなり簡単です。

URIにtraceオプションを設定すると、ハンドシェイクとすべてを確認できます。@testing.activeMqInstance=failover:tcp://localhost:61616?trace=true

09:36:06.764 [ActiveMQ Task-1] DEBUG o.a.a.t.failover.FailoverTransport - Attempting  0th  connect to: tcp://localhost:61616?trace=true
09:36:06.780 [ActiveMQ Task-1] DEBUG o.a.a.transport.WireFormatNegotiator - Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
09:36:06.780 [ActiveMQ Task-1] DEBUG o.a.a.t.TransportLogger.Connection:2 - SENDING: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
09:36:06.780 [ActiveMQ Task-1] DEBUG o.a.a.t.failover.FailoverTransport - Connection established
09:36:06.780 [ActiveMQ Task-1] INFO  o.a.a.t.failover.FailoverTransport - Successfully connected to tcp://localhost:61616?trace=true
09:36:06.780 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@4060] DEBUG o.a.a.t.TransportLogger.Connection:2 - RECEIVED: WireFormatInfo { version=9, properties={CacheSize=1024, MaxFrameSize=9223372036854775807, CacheEnabled=true, SizePrefixDisabled=false, TcpNoDelayEnabled=true, MaxInactivityDurationInitalDelay=10000, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}

ただし、stomp(またはそのことについては任意のamqp)を実行する場合。

URIをに変更する@testing.activeMqInstance=failover:stomp://localhost:61612?trace=trueと、接続(ソケット)が確立され、プロトコルが開始されないように見えます。

09:37:07.444 [ActiveMQ Task-1] DEBUG o.a.a.t.failover.FailoverTransport - urlList connectionList:[stomp://localhost:61612?trace=true], from: [stomp://localhost:61612?trace=true]
09:37:07.444 [ActiveMQ Task-1] DEBUG o.a.a.t.failover.FailoverTransport - Attempting  0th  connect to: stomp://localhost:61612?trace=true
09:37:07.444 [ActiveMQ Task-1] DEBUG o.a.a.t.failover.FailoverTransport - Connection established
09:37:07.444 [ActiveMQ Task-1] INFO  o.a.a.t.failover.FailoverTransport - Successfully connected to stomp://localhost:61612?trace=true
[silence]

輸送機関で活動がない理由について誰かが洞察を持っていますか?ブローカーで同じtraceオプションをオンにしましたTRACEが、クライアント(ActiveMQComponent)が最初のCONNECTフレームをイベント送信しないことを通知するログは発生しません。

参考までに、コンポーネントはSpringxmlを使用して構成されます。

<bean id="jmsActiveMqConnectionFactory" 
    class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="${activeMqInstance}" />
    <property name="userName" value="${activeMqUsername}"/>
    <property name="password" value="${activeMqPassword}"/>
</bean> 
<bean id="pooledActiveMqConnectionFactory" 
    class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
    property name="maxConnections" value="8" />
    <property name="connectionFactory" ref="jmsActiveMqConnectionFactory" />
</bean>
<bean id="jmsActiveMqConfig" 
    class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="connectionFactory" ref="pooledActiveMqConnectionFactory"/>
    <property name="concurrentConsumers" value="1"/>
</bean>
<bean id="activemq" 
    class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="configuration" ref="jmsActiveMqConfig"/>

どんな入力でも大歓迎です!:-)

4

1 に答える 1