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

3

7

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.

Jobyna answered 25/8, 2016 at 19:20 Comment(0)
I
3

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

Idioglossia answered 10/9, 2016 at 16:49 Comment(1)
:Thanks for the reply. I figure it out in a way where I am disabling Info at log4j level of activemq like this : logging.level.org.apache.activemq=WARNJobyna
C
0

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.

Corley answered 31/10, 2018 at 15:52 Comment(1)
We have spring.activemq.pool.enabled=true in our props, but we keep getting those messages with broker-url set to failover://(tcp://...,tcp://...)?randomize=false&initialReconnectDelay=5000&maxReconnectAttempts=4&timeout=3000&maxReconnectDelay=30000&jms.prefetchPolicy.all=10. So it's probably somewhere in those parameters. I agree that just pushing the log level is not real solution.Tithonus
T
0

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.

Throstle answered 3/4, 2019 at 13:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.