You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Mark Raynsford <li...@io7m.com.INVALID> on 2022/02/18 12:55:17 UTC

Settings for aggressive reconnections?

Hello!

I've been a happy user of Artemis for some time now, but I've noticed
on a few separate occasions that clients using the JMS API sometimes
seem to fail to reconnect to the broker if they're using an unreliable
connection.

For the sake of discussion, let's assume that I have a completely boring
and vanilla example like this:

  https://gist.github.com/io7m/e681abb2ba0bb12c64aca7f223d1ea87

Are there any settings I can configure on the transport or the
connections that would trigger much more aggressive timeouts and
reconnections for an unreliable connection? Is there some kind of
heartbeat mechanism that I'm not seeing in the API?

I think part of the problem has been that the topics these clients are
subscribed to are very low traffic, and so it almost seems like clients
lose the connection but don't notice.

-- 
Mark Raynsford | https://www.io7m.com


Re: Settings for aggressive reconnections?

Posted by Mark Raynsford <li...@io7m.com.INVALID>.
A bit more context, it seems like sometimes this will be logged:

AMQ212037: Connection failure to ... has been detected: AMQ219011: Did
not receive data from server for
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection@28ca7d3[ID=70df78cd,
local= .., remote=...] [code=CONNECTION_TIMEDOUT]

But that's not hugely helpful if no reconnection attempt is apparently
made.

-- 
Mark Raynsford | https://www.io7m.com


Re: Settings for aggressive reconnections?

Posted by Mark Raynsford <li...@io7m.com.INVALID>.
On 2022-02-18T12:55:17 +0000
Mark Raynsford <li...@io7m.com> wrote:
>
> final var message = subscriber.receive(1_000L);
> message.acknowledge();

Obviously there should be a null check here. :)

-- 
Mark Raynsford | https://www.io7m.com