2

I use Spring Integration 3.0.0 with Active MQ 5.11.1 it works without any problem. but I noticed that when I stop Active MQ, i get error in my logs every 5 seconds. if you have an idea for this problem?

Error :

ERROR [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1] [DefaultMessageListenerContainer]  Could not refresh JMS Connection for destination 'topic' - retrying in 5000 ms. Cause: Could not connect to broker URL: localhost. Reason: java.net.ConnectException: Connection refused: connect
Rami
  • 73
  • 1
  • 7

1 Answers1

2

When the listener container loses the connection, it tries to reconnect every 5 seconds by default until the broker is running again.

You can configure the time and/or add an exponential back off. See setRecoveryInterval and setBackOff.

Or, call stop() on the container to stop the attempts.

Call start() to start again.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • thnx for your answer, but this it's possible for "message-driven-channel"? because my problem is in message-driven adapter and not in outbound-channel-adapter – Rami Aug 27 '15 at 13:29
  • This applies to a message driven adapter or message driven channel. It's not relevant for an outbound adapter. I am not sure why you consider it a "problem". It's working as designed. – Gary Russell Aug 27 '15 at 22:28