[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

no consumers for the queue by a duplex network connector

activemq version: 5.14.0 
jdk version: 1.7.0_67

Broker cluster A(a 3 instances activemq cluster use jdbc lock with mysql
backend) and Broker B cluster(a 3 instances  cluster use jdbc lock with
mysql backend).
Broker B config a duplex network connector to Broker A. Producer produce
messages into brokerA, consumers consume messages from broke B, bridge queue
like queueA,queueB 
Also there are to more cluster connect to Broker A with a same network
connector like BrokerB

networkConnector config in Broker B (this is the compeletely config in the
real environment, no any other extra configuration): 
duplex="true" name="bridge_111"></networkConnector> 

early this morning, brokeB happened a faileover event, and the master
changed. the pre-master Broker B1 lost the jdbc lock. and broker B2 in the
broke B cluster, successfuly became the master, and established the network
connection to broker A. 
And then, the problem happened. producer can produce messages to Broker A,
but consumers cannot consumer messages from brokeB by the same queue.

1、as the log shows, the network bridge has successfully been established。and
there  are no other error logs info. 
2、I found that, when consumer connect to broker B to consume queueA, in
broke A, there is no consumers for queueA.Normally, here should be a network
bridge consumer to brokeA.
3、restart the broke A and broke B,the problem happened as same 
4、when the problem happened,Iuse jconsole to see the  jmx info. I can see
that there certainly was no consumer of the Broker A,and there was no topic
name like "ActiveMQ.Advisory.Consumer.Queue.queueA" for the bridge queue
5、I try to use static bridge for testing, and when static bridge was
configed fo the queueA,the problem disappeared.So it seam like the advisory
topic's problem, as I know that bridge need adbisory topic and message.

resole solution:
shutdown all the instances of broker cluster A,and broker cluster B.and then
start a instance of broker cluster A, then start a instance of broker
cluster B.
By these steps, the network bridge back to normal,and the bridge-queue has
the consumers.

this problem happened very often recently, once fail-over happened,it
happened, and I have to use the above steps to recovery the cluster.

the activemq.xml :


        <property name="locations">

    <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
          lazy-init="false" scope="singleton"
          init-method="start" destroy-method="stop">
  <bean id="mysql-ds" class="org.apache.commons.dbcp2.BasicDataSource"
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
    <property name="username" value="****"/>
    <property name="password" value="****"/>
    <property name="initialSize" value="10" />
    <property name="maxIdle" value="10" />
    <property name="minIdle" value="100" />
    <property name="validationQuery" value="select 1" />
    <property name="poolPreparedStatements" value="true"/>

    <broker xmlns="";
brokerName="bj_172.20.32.110" dataDirectory="${}">

                <policyEntry topic=">" >
                    <constantPendingMessageLimitStrategy limit="8000"/>

            <managementContext createConnector="true"/>

               <jdbcPersistenceAdapter dataDirectory="activemq-data" 

                    <memoryUsage percentOfJvmHeap="70" />
                    <storeUsage limit="100 gb"/>
                    <tempUsage limit="50 gb"/>

                <transportConnector name="openwire"
            <transportConnector name="amqp"
            <transportConnector name="stomp"
            <transportConnector name="mqtt"
            <transportConnector name="ws"

            <bean xmlns="";
class="org.apache.activemq.hooks.SpringContextHook" />


    <import resource="jetty.xml"/>


Sent from: