ActiveMQ Artemis JMS Failover With Transaction Example

# JMS Failover With Transaction Example

    To run the example, simply type mvn verify from this directory.

This example demonstrates two servers coupled as a live-backup pair for high availability (HA), and a client connection failing over from live to backup when the live server is crashed.

Failover behavior differs whether the JMS session is transacter or not.

When a transacted JMS session is used, once-and-only once delivery is guaranteed.

- if the failover occurs while there is an in-flight transaction, the transaction will be flagged as rollback only. In that case, the JMS client will need to retry the transaction work.
- if the failover occurs while there is no in-flight transaction, the failover will be transparent to the user.

ActiveMQ Artemis also provides an example for non-transaction failover.

For more information on ActiveMQ Artemis failover and HA, and clustering in general, please see the clustering section of the user manual.