bvyas
bvyas

Reputation: 451

How to disable transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616 message

While subscribing message using DefaultJmsListenerContainerFactory in spring and camel using failover activemq transport I am continuously getting below INFO messages.

2016-08-25 15:00:07,235 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:08,265 [ActiveMQ Task-1] INFO transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:08,265 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:09,296 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:09,328 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:10,299 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:10,346 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616
2016-08-25 15:00:11,318 [ActiveMQ Task-1] INFO  transport.failover.FailoverTransport Successfully connected to tcp://localhost:61616

Is this possible to disable this INFO message on console or is there any time interval for printing this message on console?

I have tried to use some ActiveMQ transport connection option but it didn't help me.

Upvotes: 7

Views: 6762

Answers (4)

Morgan Smith
Morgan Smith

Reputation: 1

To add upon dave.c's answer, you'll need the pooled-jms package for the pool to instantiate.

implementation("org.messaginghub:pooled-jms:3.1.7")

Upvotes: 0

max
max

Reputation: 1266

From the ActiveMQ Forum:

The default idleTimeout of the PooledConnectionFactory is only 30 seconds. And physical connections are borrowed in a round-robin fashion. So if it takes the application more than 30 seconds to cycle through the 5 connections, you'll start observing connection churn, which seems exactly what's happening in your case. Is it possible that 30 secs elapsed between subsequent uses of the JmsTemplate in your scenario?

So the solution should be to update the connection pool's idleTimeout.

Upvotes: 0

dave.c
dave.c

Reputation: 10908

We found that the connection pool is disabled by default when using SpringBoot and ActiveMQ. We set the following property in our application.yml file to enable the pool:

spring.activemq.pool.enabled: true

Setting the log level to WARN just masks the problem, as it will still be discarding and recreating the connections behind the scenes.

Upvotes: 0

gtonic
gtonic

Reputation: 2313

The first thing which comes to my mind that you could play around with the failover parameters like documented here: http://activemq.apache.org/failover-transport-reference.html

Upvotes: 3

Related Questions