Wednesday, March 30, 2011

[WARN] org.apache.activemq.broker.TransportConnection - Unexpected extra broker info command received

If you have been using AMQ I'm pretty sure you have run into this problem.

Basically, it happens when you use network brokers with forwarding data policy.

Where AMQ1 is the producer and AMQ2 is the consumr, AMQ1 forwards data to AMQ2.

Architecture:

FE-AMQ will be considered AMQ1 and INBOUND AMQ will be AMQ2.

For example:
=== AMQ 1===


<networkConnectors>
<networkConnector uri="static:failover:(tcp://amq2:61616)?initialReconnectDelay=10000&amp;maxReconnectDelay=10000&amp;useExponentialBackOff=false" />
</networkConnectors>

In this case, AMQ1 forwards data to AMQ2.

When you bring both AMQ up for the first time you will see that AMQ1 shows:


INFO  DemandForwardingBridge         - Network connection between vm://amq-01#0 and tcp://amq2:61616(amq2-inboundBroker) has been established.

Which it's perfect, just what we want, now, if you restart AMQ2, sometimes you will get:

WARN  TransportConnection            - Unexpected extra broker info command received: BrokerInfo.


I have noticed that this behavior happens when using AMQ 5.3.2 or older versions, one of the solutions will be to upgrade to AMQ 5.4.2 and make brokerName and brokerId the same.

=== AMQ1 ===
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="amq1" brokerId="amq1" dataDirectory="${activemq.base}/data">

=== AMQ2 ===
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="amq2" brokerId="amq2" dataDirectory="${activemq.base}/data">

When you restart any of the AMQ the DemandForwardingBridge is successfully reconnected and you get rid of the WARN  TransportConnection message.

No comments:

Post a Comment