activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <>
Subject Re: Artemis automatic client reconnection?
Date Fri, 21 Oct 2016 13:53:14 GMT
I believe you should just need to specify a non-zero value for reconnectAttempts, e.g.:


Or you can invoke setReconnectAttempts() on the ServerLocator object before you use it.

There's a couple of other parameters you can configure to control reconnection (e.g. retryInterval,

You can also check out the "reattach-node" example shipped with Artemis to see a working example.


----- Original Message -----
From: "Marko Asplund" <>
To: "users" <>
Sent: Friday, October 21, 2016 8:36:48 AM
Subject: Artemis automatic client reconnection?


How do I get an Artemis client session to automatically reconnect after a
transient network disconnect or a server restart?

Messages are consumed using the Artemis Core API message handler, so
consumer processes are long-running and only create an Artemis client
session at startup.
Currently, the consumer doesn't seem to receive new messages after the
server is restarted. Client connections are initiated
using ActiveMQClient.createServerLocatorWithoutHA() (one server instance

I'm using Artemis v1.4.0.


View raw message