How do I configure automatic reconnection

 FAQ > Configuration > How do I configure automatic reconnection

If a JMS broker goes down, ActiveMQ Classic can automatically reconnect to an available JMS broker using the failover: protocol. Not only does this automatically reconnect, it will also resume any temporary destinations, sessions, producers and most importantly consumers.

All of this happens silently inside the JMS client so you don’t need to worry about it in your application code.

e.g. connecting to the URL


For more detail see Failover Transport Reference

Apache, ActiveMQ, Apache ActiveMQ, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. Copyright © 2024, The Apache Software Foundation. Licensed under Apache License 2.0.