You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rdvries <ro...@triodos.com.INVALID> on 2019/12/13 11:27:22 UTC
Getting "Succesfully connected" all the time when failover is setup
Hi all!
We've recently been connecting to another party's broker, with a failover
setup.
We soon discovered we're getting a lot of these:
11:51:36,115 INFO
[org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1)
Successfully connected to tcp://<host>:61616
Sometimes even a couple per second.
It seems to be related to the failover.
I can reproduce this by just running a local broker with a failover URL like
so (no messaging involved)
<resource-adapter id="activemq-ra">
<archive>
activemq-rar.rar
</archive>
<config-property name="ServerUrl">
failover:(tcp://localhost:61616,tcp://localhost:61617)?randomize=false
</config-property>
<connection-definitions>
<connection-definition
class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory"
jndi-name="activemq/ConnectionFactory" pool-name="activemq">
<recovery no-recovery="true"/>
</connection-definition>
</connection-definitions>
</resource-adapter>
Using version 5.15.9, with Jboss 7.2.
Locally, the message / (re?)connection seems to be triggered by the periodic
recovery period of the transaction manager.
So setting the tx manager recovery like following, I can locally exactly see
the 30/10 pattern in the loggings:
-DRecoveryEnvironmentBean.periodicRecoveryPeriod=30
-DRecoveryEnvironmentBean.recoveryBackoffPeriod=10
We've been tinkering and staring at trace/debug logging for too long now...
time to ask help :)
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Re: Getting "Succesfully connected" all the time when failover is
setup
Posted by Robbert de Vries <Ro...@triodos.com.INVALID>.
Doesn't anyone have any idea?
Didn't I provide enough information? Is the problem too hard to help out with?
It would really help to get some thoughts on disabling the XA recovery. Whether this is a problem, and whether we're doing it in the right way?
See my last post.
On 16/12/2019, 16:00, "Robbert de Vries" <Ro...@triodos.com.INVALID> wrote:
Also, I discovered this warning in the startup of JBoss.
15:47:36,686 WARN [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-7) IJ020016: Missing <recovery> element. XA recovery disabled for: java:/activemq/ConnectionFactory
I even get that when I explicitly add <recovery no-recovery="true"/> to the connection-definition.
So I guess XA recovery is disabled anyway, for this connection factory...
Is it save to just disable periodic recovery in this setup? Like so
-DRecoveryEnvironmentBean.periodicRecoveryPeriod=0
-DRecoveryEnvironmentBean.recoveryBackoffPeriod=0
We don't want tx management between datasource and jms messages anyway. Any millisecond in the app will count, and XA takes performance penalty.
Re: Getting "Succesfully connected" all the time when failover is
setup
Posted by Robbert de Vries <Ro...@triodos.com.INVALID>.
Also, I discovered this warning in the startup of JBoss.
15:47:36,686 WARN [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-7) IJ020016: Missing <recovery> element. XA recovery disabled for: java:/activemq/ConnectionFactory
I even get that when I explicitly add <recovery no-recovery="true"/> to the connection-definition.
So I guess XA recovery is disabled anyway, for this connection factory...
Is it save to just disable periodic recovery in this setup? Like so
-DRecoveryEnvironmentBean.periodicRecoveryPeriod=0
-DRecoveryEnvironmentBean.recoveryBackoffPeriod=0
We don't want tx management between datasource and jms messages anyway. Any millisecond in the app will count, and XA takes performance penalty.
Re: Getting "Succesfully connected" all the time when failover is
setup
Posted by Robbert de Vries <Ro...@triodos.com.INVALID>.
Maybe some more information;
Here's a recent local logging
14:37:17,865 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (Periodic Recovery) Stopped tcp://localhost:61616
14:37:17,866 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (Periodic Recovery) Reconnect was triggered but transport is not started yet. Wait for start to connect the transport.
14:37:17,866 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (Periodic Recovery) Started unconnected
14:37:17,866 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (Periodic Recovery) Waking up reconnect task
14:37:17,867 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) urlList connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616]
14:37:17,867 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Attempting 0th connect to: tcp://localhost:61616
14:37:17,867 DEBUG [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Connection established
14:37:17,868 INFO [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Successfully connected to tcp://localhost:61616
On 13/12/2019, 18:13, "rdvries" <ro...@triodos.com.INVALID> wrote:
Hi all!
We've recently been connecting to another party's broker, with a failover
setup.
We soon discovered we're getting a lot of these:
11:51:36,115 INFO
[org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1)
Successfully connected to tcp://<host>:61616
Sometimes even a couple per second.
It seems to be related to the failover.
I can reproduce this by just running a local broker with a failover URL like
so (no messaging involved)
<resource-adapter id="activemq-ra">
<archive>
activemq-rar.rar
</archive>
<config-property name="ServerUrl">
failover:(tcp://localhost:61616,tcp://localhost:61617)?randomize=false
</config-property>
<connection-definitions>
<connection-definition
class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory"
jndi-name="activemq/ConnectionFactory" pool-name="activemq">
<recovery no-recovery="true"/>
</connection-definition>
</connection-definitions>
</resource-adapter>
Using version 5.15.9, with Jboss 7.2.
Locally, the message / (re?)connection seems to be triggered by the periodic
recovery period of the transaction manager.
So setting the tx manager recovery like following, I can locally exactly see
the 30/10 pattern in the loggings:
-DRecoveryEnvironmentBean.periodicRecoveryPeriod=30
-DRecoveryEnvironmentBean.recoveryBackoffPeriod=10
We've been tinkering and staring at trace/debug logging for too long now...
time to ask help :)
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html