## Attributes (9)

- allow-failback - Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.

  Type | BOOLEAN
  Default Value | true
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "BOOLEAN"
          },
          "description" : "Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : true,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- failover-on-server-shutdown - Whether the server must failover when it is normally shutdown.

  Type | BOOLEAN
  Default Value | false
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "BOOLEAN"
          },
          "description" : "Whether the server must failover when it is normally shutdown.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : false,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- restart-backup - Will this server, if a backup, restart once it has been stopped because of failback or scaling down.

  Type | BOOLEAN
  Default Value | true
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "BOOLEAN"
          },
          "description" : "Will this server, if a backup, restart once it has been stopped because of failback or scaling down.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : true,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down - Configure whether this server send its messages to another live server in the scale-down cluster when it is shutdown cleanly.

  Type | BOOLEAN
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "BOOLEAN"
          },
          "description" : "Configure whether this server send its messages to another live server in the scale-down cluster when it is shutdown cleanly.",
          "attribute-group" : "scale-down",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down-cluster-name - Name of the cluster used to scale down.

  Type | STRING
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Name of the cluster used to scale down.",
          "attribute-group" : "scale-down",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down-commit-interval - The batch size for committing the messages being moved on scale down.

  Type | INT
  Default Value | -1
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The batch size for committing the messages being moved on scale down.",
          "attribute-group" : "scale-down",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : -1,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down-connectors - List of connectors used to form the scale-down cluster.

  Type | LIST
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LIST"
          },
          "description" : "List of connectors used to form the scale-down cluster.",
          "attribute-group" : "scale-down",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "alternatives" : ["scale-down-discovery-group"],
          "min-length" : 0,
          "max-length" : 2147483647,
          "stability" : "default",
          "value-type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down-discovery-group - Name of the discovery group used to build the scale-down cluster

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Name of the discovery group used to build the scale-down cluster",
          "attribute-group" : "scale-down",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "alternatives" : ["scale-down-connectors"],
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- scale-down-group-name - Name of the group used to scale down.

  Type | STRING
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Name of the group used to scale down.",
          "attribute-group" : "scale-down",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

## Operations (2)

- add - Add an HA Policy to configure high availability for this ActiveMQ server.

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  allow-failback | BOOLEAN | false | true | true | Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.
  failover-on-server-shutdown | BOOLEAN | false | true | false | Whether the server must failover when it is normally shutdown.
  restart-backup | BOOLEAN | false | true | true | Will this server, if a backup, restart once it has been stopped because of failback or scaling down.
  scale-down | BOOLEAN | false | true |  | Configure whether this server send its messages to another live server in the scale-down cluster when it is shutdown cleanly.
  scale-down-cluster-name | STRING | false | true |  | Name of the cluster used to scale down.
  scale-down-commit-interval | INT | false | true | -1 | The batch size for committing the messages being moved on scale down.
  scale-down-connectors | LIST | false | false |  | List of connectors used to form the scale-down cluster.
  scale-down-discovery-group | STRING | false | false |  | Name of the discovery group used to build the scale-down cluster
  scale-down-group-name | STRING | false | true |  | Name of the group used to scale down.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Add an HA Policy to configure high availability for this ActiveMQ server.",
          "request-properties" : {
              "allow-failback" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Whether a server will automatically stop when a another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : true,
                  "stability" : "default"
              },
              "failover-on-server-shutdown" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Whether the server must failover when it is normally shutdown.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : false,
                  "stability" : "default"
              },
              "restart-backup" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Will this server, if a backup, restart once it has been stopped because of failback or scaling down.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : true,
                  "stability" : "default"
              },
              "scale-down" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Configure whether this server send its messages to another live server in the scale-down cluster when it is shutdown cleanly.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "stability" : "default"
              },
              "scale-down-cluster-name" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Name of the cluster used to scale down.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "scale-down-commit-interval" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The batch size for committing the messages being moved on scale down.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : -1,
                  "stability" : "default"
              },
              "scale-down-connectors" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LIST"
                  },
                  "description" : "List of connectors used to form the scale-down cluster.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "alternatives" : ["scale-down-discovery-group"],
                  "min-length" : 0,
                  "max-length" : 2147483647,
                  "stability" : "default",
                  "value-type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  }
              },
              "scale-down-discovery-group" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Name of the discovery group used to build the scale-down cluster",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "alternatives" : ["scale-down-connectors"],
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "scale-down-group-name" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Name of the group used to scale down.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Remove the HA Policy.

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Remove the HA Policy.",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "restart-required" : "all-services",
          "runtime-only" : false
      }

## Galleon Features

Galleon features are to be used when creating Galleon feature-packs.

- subsystem.messaging-activemq.server.ha-policy.shared-store-secondary

      <feature spec="subsystem.messaging-activemq.server.ha-policy.shared-store-secondary">
        <param name="server" value="{resource name}"/>
        <param name="allow-failback" value="{value}"/>
        <param name="failover-on-server-shutdown" value="{value}"/>
        <param name="restart-backup" value="{value}"/>
        <param name="scale-down" value="{value}"/>
        <param name="scale-down-cluster-name" value="{value}"/>
        <param name="scale-down-commit-interval" value="{value}"/>
        <param name="scale-down-connectors" value="{value}"/>
        <param name="scale-down-discovery-group" value="{value}"/>
        <param name="scale-down-group-name" value="{value}"/>
      <feature/>