You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Dominik Przybysz (JIRA)" <ji...@apache.org> on 2017/03/15 08:26:41 UTC
[jira] [Created] (AMQ-6627) Network configured via mq-fabric do not
create consumers after master/slave switch
Dominik Przybysz created AMQ-6627:
-------------------------------------
Summary: Network configured via mq-fabric do not create consumers after master/slave switch
Key: AMQ-6627
URL: https://issues.apache.org/jira/browse/AMQ-6627
Project: ActiveMQ
Issue Type: Bug
Components: networkbridge
Affects Versions: 5.14.2
Reporter: Dominik Przybysz
Hi,
we have 6 ActiveMQ (5.14.2) brokers running on Apache Karaf:
- amq1 (prod and dr) - master/slave
- amq2 (prod and dr) - master/slave
- amq3 (prod and dr) - master/slave
These brokers are connnected with network configured via mq-fabric.
Producer and consumers connect to amq1, amq2 or amq3 via load balancer using round robin algorithm.
Producers connects to each broker and send messages without problems.
Consumers are long-lived and connects to each queue and listen.
Problem is when, for example, amq2prod goes down for a moment and switches to amq2dr. Network is established after switch, producers sends messages to, for example, queue error.history.in on each broker (including amq2), but no consumers are created for this queue on amq2. All real consumers for this queue are connected to amq1 or amq3, but amq2 do not forward messages to them.
I hope this is configuration problem of our network. What we are doing wrong?
============================================
Our Configuration
Broker configuration is common and properties are filled by mq-fabric:
{code}
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"
>
<!-- Allows us to use system properties and fabric as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties">
<bean class="io.fabric8.mq.fabric.ConfigurationProperties" />
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
xmlns:b="http://www.springframework.org/schema/beans"
brokerName="${broker-name}"
dataDirectory="${data}"
useJmx="true"
enableStatistics="true"
advisorySupport="true"
persistent="true"
schedulerSupport="true"
start="false"
restartAllowed="false"
>
<managementContext>
<managementContext createConnector="false" />
</managementContext>
<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#amqDataSource">
<statements>
<statements tablePrefix="AMQ4_" />
</statements>
</jdbcPersistenceAdapter>
</persistenceAdapter>
<plugins>
<jaasAuthenticationPlugin configuration="karaf" />
<runtimeConfigurationPlugin checkPeriod="30000" />
</plugins>
<!-- system usage omitted -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61696?transport.closeAsync=false" />
</transportConnectors>
</broker>
<!-- amqDataSource configuration omitted -->
</beans>
{code}
Configuration is similar for each broker io.fabric8.mq.fabric.server-<brokername> - different is only ds-sid, ds-username and ds-password:
{code}
config=profile\:broker.xml
config.checksum=${checksum:profile\:broker.xml}
broker-name=amq1
data=${runtime.data}/amq
ds-sid=AMQ1
ds-username=${profile:amq.ds.${containerEnv}/amq1Username}
ds-password=${profile:amq.ds.${containerEnv}/amq1Password}
connectors=openwire
group=AMQ4
kind=MasterSlave
standby.pool=AMQ4
network=AMQ4
network.userName=amq
network.password=${profile:amq.ds.${containerEnv}/amqNetworkPassword}
network.messageTTL=-1
network.consumerTTL=1
network.networkConnectorStartAsync=true
network.suppressDuplicateQueueSubscriptions=true
network.suppressDuplicateTopicSubscriptions=true
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)