Hi Patrick,

you need to inspect the config objects to use the broker properties. The
config objects for ha-policy are at
https://github.com/apache/activemq-artemis/tree/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ha
The tests related to ha-policy broker properties are at
https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java#L1160

The following broker properties configure the ha-policy of the primary
broker:
HAPolicyConfiguration=REPLICATION_PRIMARY_QUORUM_VOTING
HAPolicyConfiguration.checkForPrimaryServer=true

The following broker properties configure the ha-policy of the backup
broker:
HAPolicyConfiguration=REPLICATION_BACKUP_QUORUM_VOTING
HAPolicyConfiguration.allowFailBack=true
HAPolicyConfiguration.restartBackup=true

Regards,
Domenico

On Fri, 16 May 2025 at 14:46, Patrick, Alton (US)
<alton.patr...@baesystems.us.invalid> wrote:

> I'm trying to understand how to use broker properties (
> https://activemq.apache.org/components/artemis/documentation/latest/configuration-index.html#broker-properties),
> specifically to configure high availability.
>
> For example, how would I represent this sort of XML configuration in a
> properties file?
>
> <ha-policy>
>    <replication>
>       <primary>
>          <check-for-active-server>true</check-for-active-server>
>       </primary>
>       <backup>
>          <allow-failback>true</allow-failback>
>          <restart-backup>true</restart-backup>
>       </backup>
>    </replication>
> </ha-policy>
>
>
>
>

Reply via email to