

# Amazon MQ for ActiveMQ broker configurations
<a name="amazon-mq-broker-configuration-parameters"></a>

 A configuration contains all of the settings for your ActiveMQ broker in XML format (similar to ActiveMQ's `activemq.xml` file). You can create a configuration before creating any brokers. You can then apply the configuration to one or more brokers. 

**Important**  
Making changes to a configuration does *not* apply the changes to the broker immediately. To apply your changes, you must wait for the next maintenance window or [reboot the broker](amazon-mq-rebooting-broker.md).  
You can only **delete** a configuration using the `DeleteConfiguration` API. For more information, see [Configurations](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/configurations-configuration-id.html) in the *Amazon MQ API Reference*.

## Attributes
<a name="configuration-attributes"></a>

A broker configuration has several attributes, for example:
+ A name (`MyConfiguration`)
+ An ID (`c-1234a5b6-78cd-901e-2fgh-3i45j6k178l9`)
+ An Amazon Resource Name (ARN) (`arn:aws:mq:us-east-2:123456789012:configuration:c-1234a5b6-78cd-901e-2fgh-3i45j6k178l9`)

For a full list of configuration attributes, see the following in the *Amazon MQ REST API Reference*:
+ [REST Operation ID: Configuration](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/rest-api-configuration.html)
+ [REST Operation ID: Configurations](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/rest-api-configurations.html)

For a full list of configuration revision attributes, see the following:
+ [REST Operation ID: Configuration Revision](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/rest-api-configuration-revision.html)
+ [REST Operation ID: Configuration Revisions](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/rest-api-configuration-revisions.html)

## Using Spring XML configuration files
<a name="working-with-spring-xml-configuration-files"></a>

ActiveMQ brokers are configured using [Spring XML](https://docs.spring.io/spring/docs/current/spring-framework-reference/) files. You can configure many aspects of your ActiveMQ broker, such as predefined destinations, destination policies, authorization policies, and plugins. Amazon MQ controls some of these configuration elements, such as network transports and storage. Other configuration options, such as creating networks of brokers, aren't currently supported.

The full set of supported configuration options is specified in the Amazon MQ XML schemas. Download zip files of the supported schemas using the following links.
+ [samples/amazon-mq-active-mq-5.19.1.xsd.zip](samples/amazon-mq-active-mq-5.19.1.xsd.zip) 
+ [samples/amazon-mq-active-mq-5.18.4.xsd.zip](samples/amazon-mq-active-mq-5.18.4.xsd.zip) 
+ [samples/amazon-mq-active-mq-5.17.6.xsd.zip](samples/amazon-mq-active-mq-5.17.6.xsd.zip) 
+ [samples/amazon-mq-active-mq-5.16.7.xsd.zip](samples/amazon-mq-active-mq-5.16.7.xsd.zip) 
+  [samples/amazon-mq-active-mq-5.15.16.xsd.zip](samples/amazon-mq-active-mq-5.15.16.xsd.zip) 

You can use these schemas to validate and sanitize your configuration files. Amazon MQ also lets you provide configurations by uploading XML files. When you upload an XML file, Amazon MQ automatically sanitizes and removes invalid and prohibited configuration parameters according to the schema.

**Note**  
You can use only static values for attributes. Amazon MQ sanitizes elements and attributes that contain Spring expressions, variables, and element references from your configuration.

# Creating an Amazon MQ for ActiveMQ broker configuration
<a name="amazon-mq-creating-applying-configurations"></a>

A *configuration* contains all of the settings for your ActiveMQ broker, in XML format (similar to ActiveMQ's `activemq.xml` file). You can create a configuration before creating any brokers. You can then apply the configuration to one or more brokers. You can apply a configuration immediately or during a *maintenance window*.

The following example shows how you can create and apply an Amazon MQ broker configuration using the AWS Management Console.

**Important**  
You can only **delete** a configuration using the `DeleteConfiguration` API. For more information, see [Configurations](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/configurations-configuration-id.html) in the *Amazon MQ API Reference*.

## Create a New Configuration
<a name="creating-configuration-from-scratch-console"></a>

To create a new broker configuration, first create the new configuration.

1. Sign in to the [Amazon MQ console](https://console.aws.amazon.com/amazon-mq/).

1. On the left, expand the navigation panel and choose **Configurations**.  
![\[Amazon MQ navigation panel showing Brokers and Configurations options.\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/images/amazon-mq-tutorials-create-configuration.png)

1. On the **Configurations** page, choose **Create configuration**.

1. On the **Create configuration** page, in the **Details** section, type the **Configuration name** (for example, `MyConfiguration`) and select a **Broker engine** version.
**Note**  
To learn more about ActiveMQ engine versions supported by Amazon MQ for ActiveMQ, see [Managing Amazon MQ for ActiveMQ engine versions](activemq-version-management.md).

1. Choose **Create configuration**.

## Create a New Configuration Revision
<a name="creating-new-configuration-revision-console"></a>

After you create a broker configuration, you will need to edit the configuration using a configuration revision.

1. From the configuration list, choose ***MyConfiguration***.
**Note**  
The first configuration revision is always created for you when Amazon MQ creates the configuration.

   On the ***MyConfiguration*** page, the broker engine type and version that your new configuration revision uses (for example, **Apache ActiveMQ 5.15.16**) are displayed.

1. On the **Configuration details** tab, the configuration revision number, description, and broker configuration in XML format are displayed.
**Note**  
Editing the current configuration creates a new configuration revision.  
![\[XML configuration snippet for ActiveMQ broker with explanatory comment.\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/images/amazon-mq-tutorials-edit-configuration.png)

1. Choose **Edit configuration** and make changes to the XML configuration.

1. Choose **Save**.

   The **Save revision** dialog box is displayed.

1. (Optional) Type `A description of the changes in this revision`.

1. Choose **Save**.

   The new revision of the configuration is saved.
**Important**  
The Amazon MQ console automatically sanitizes invalid and prohibited configuration parameters according to a schema. For more information and a full list of permitted XML parameters, see [Amazon MQ for ActiveMQ broker configurations](amazon-mq-broker-configuration-parameters.md).

## Apply a Configuration Revision to Your Broker
<a name="apply-configuration-revision-creating-console"></a>

After revising the configuration, you can apply the configuration revision to your broker.

1. On the left, expand the navigation panel and choose **Brokers**.  
![\[Amazon MQ navigation panel showing Brokers and Configurations options.\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/images/amazon-mq-tutorials-apply-configuration.png)

1. From the broker list, select your broker (for example, **MyBroker**) and then choose **Edit**.

1. On the **Edit *MyBroker*** page, in the **Configuration** section, select a **Configuration** and a **Revision** and then choose **Schedule Modifications**.

1. In the **Schedule broker modifications** section, choose whether to apply modifications **During the next scheduled maintenance window** or **Immediately**.
**Important**  
Single instance brokers are offline while being rebooted. For cluster brokers, only one node is down at a time while the broker reboots.

1. Choose **Apply**.

   Your configuration revision is applied to your broker at the specified time.

# Edit an Amazon MQ for ActiveMQ configuration revision
<a name="edit-current-configuration-console"></a>

You may want to edit a configuration revision after applying it to your broker. Use the following instructions to edit a configuration revision.

1. Sign in to the [Amazon MQ console](https://console.aws.amazon.com/amazon-mq/).

1. From the broker list, select your broker (for example, **MyBroker**) and then choose **Edit**.

1. On the ***MyBroker*** page, choose **Edit**.

1. On the **Edit *MyBroker*** page, in the **Configuration** section, select a **Configuration** and a **Revision** and then choose **Edit**.
**Note**  
Unless you select a configuration when you create a broker, the first configuration revision is always created for you when Amazon MQ creates the broker.

   On the ***MyBroker*** page, the broker engine type and version that the configuration uses (for example, **Apache ActiveMQ 5.15.8**) are displayed.

1. On the **Configuration details** tab, the configuration revision number, description, and broker configuration in XML format are displayed.
**Note**  
Editing the current configuration creates a new configuration revision.  
![\[XML configuration snippet for ActiveMQ broker with explanatory comment.\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/images/amazon-mq-tutorials-edit-configuration.png)

1. Choose **Edit configuration** and make changes to the XML configuration.

1. Choose **Save**.

   The **Save revision** dialog box is displayed.

1. (Optional) Type `A description of the changes in this revision`.

1. Choose **Save**.

   The new revision of the configuration is saved.
**Important**  
The Amazon MQ console automatically sanitizes invalid and prohibited configuration parameters according to a schema. For more information and a full list of permitted XML parameters, see [Amazon MQ for ActiveMQ broker configurations](amazon-mq-broker-configuration-parameters.md).

# Elements permitted in Amazon MQ configurations
<a name="permitted-elements"></a>

The following is a detailed listing of the elements permitted in Amazon MQ configurations. For more information, see [XML Configuration](http://activemq.apache.org/xml-configuration.html) in the Apache ActiveMQ documentation.


| Element | 
| --- | 
| abortSlowAckConsumerStrategy [(attributes)](permitted-attributes.md#abortSlowAckConsumerStrategy.attributes) | 
| abortSlowConsumerStrategy [(attributes)](permitted-attributes.md#abortSlowConsumerStrategy.attributes) | 
| authorizationEntry [(attributes)](permitted-attributes.md#authorizationEntry.attributes) | 
| authorizationMap [(child collection elements)](permitted-collections.md#authorizationMap.collections) | 
| authorizationPlugin [(child collection elements)](permitted-collections.md#authorizationPlugin.collections) | 
| broker [(attributes](permitted-attributes.md#broker.attributes) \$1 [child collection elements)](permitted-collections.md#broker.collections) | 
| cachedMessageGroupMapFactory [(attributes)](permitted-attributes.md#cachedMessageGroupMapFactory.attributes) | 
| compositeQueue [(attributes](permitted-attributes.md#compositeQueue.attributes) \$1 [child collection elements)](permitted-collections.md#compositeQueue.collections) | 
| compositeTopic [(attributes](permitted-attributes.md#compositeTopic.attributes) \$1 [child collection elements)](permitted-collections.md#compositeTopic.collections) | 
| constantPendingMessageLimitStrategy [(attributes)](permitted-attributes.md#constantPendingMessageLimitStrategy.attributes) | 
| discarding [(attributes)](permitted-attributes.md#discarding.attributes) | 
| discardingDLQBrokerPlugin [(attributes)](permitted-attributes.md#discardingDLQBrokerPlugin.attributes) | 
| fileCursor | 
| fileDurableSubscriberCursor | 
| fileQueueCursor | 
| filteredDestination [(attributes)](permitted-attributes.md#filteredDestination.attributes) | 
| fixedCountSubscriptionRecoveryPolicy [(attributes)](permitted-attributes.md#fixedCountSubscriptionRecoveryPolicy.attributes) | 
| fixedSizedSubscriptionRecoveryPolicy [(attributes)](permitted-attributes.md#fixedSizedSubscriptionRecoveryPolicy.attributes) | 
| forcePersistencyModeBrokerPlugin [(attributes)](permitted-attributes.md#forcePersistencyModeBrokerPlugin.attributes) | 
| individualDeadLetterStrategy [(attributes)](permitted-attributes.md#individualDeadLetterStrategy.attributes) | 
| lastImageSubscriptionRecoveryPolicy | 
| messageGroupHashBucketFactory [(attributes)](permitted-attributes.md#messageGroupHashBucketFactory.attributes) | 
| mirroredQueue [(attributes)](permitted-attributes.md#mirroredQueue.attributes) | 
| noSubscriptionRecoveryPolicy | 
| oldestMessageEvictionStrategy [(attributes)](permitted-attributes.md#oldestMessageEvictionStrategy.attributes) | 
| oldestMessageWithLowestPriorityEvictionStrategy [(attributes)](permitted-attributes.md#oldestMessageWithLowestPriorityEvictionStrategy.attributes) | 
| policyEntry [(attributes](permitted-attributes.md#policyEntry.attributes) \$1 [child collection elements)](permitted-collections.md#policyEntry.collections) | 
| policyMap [(child collection elements)](permitted-collections.md#policyMap.collections) | 
| prefetchRatePendingMessageLimitStrategy [(attributes)](permitted-attributes.md#prefetchRatePendingMessageLimitStrategy.attributes) | 
| priorityDispatchPolicy | 
| priorityNetworkDispatchPolicy | 
| queryBasedSubscriptionRecoveryPolicy [(attributes)](permitted-attributes.md#queryBasedSubscriptionRecoveryPolicy.attributes) | 
| queue [(attributes)](permitted-attributes.md#queue.attributes) | 
| redeliveryPlugin [(attributes](permitted-attributes.md#redeliveryPlugin.attributes) \$1 [child collection elements)](permitted-collections.md#redeliveryPlugin.collections) | 
| redeliveryPolicy [(attributes)](permitted-attributes.md#redeliveryPolicy.attributes) | 
| redeliveryPolicyMap [(child collection elements)](permitted-collections.md#redeliveryPolicyMap.collections) | 
| retainedMessageSubscriptionRecoveryPolicy [(child collection elements)](permitted-collections.md#retainedMessageSubscriptionRecoveryPolicy.collections) | 
| roundRobinDispatchPolicy | 
| sharedDeadLetterStrategy [(attributes](permitted-attributes.md#sharedDeadLetterStrategy.attributes) \$1 [child collection elements)](permitted-collections.md#sharedDeadLetterStrategy.collections) | 
| simpleDispatchPolicy | 
| simpleMessageGroupMapFactory | 
| statisticsBrokerPlugin | 
| storeCursor | 
| storeDurableSubscriberCursor [(attributes)](permitted-attributes.md#storeDurableSubscriberCursor.attributes) | 
| strictOrderDispatchPolicy | 
| tempDestinationAuthorizationEntry [(attributes)](permitted-attributes.md#tempDestinationAuthorizationEntry.attributes) | 
| tempQueue [(attributes)](permitted-attributes.md#tempQueue.attributes) | 
| tempTopic [(attributes)](permitted-attributes.md#tempTopic.attributes) | 
| timedSubscriptionRecoveryPolicy [(attributes)](permitted-attributes.md#timedSubscriptionRecoveryPolicy.attributes) | 
| timeStampingBrokerPlugin [(attributes)](permitted-attributes.md#timeStampingBrokerPlugin.attributes) | 
| topic [(attributes)](permitted-attributes.md#topic.attributes) | 
| transportConnector [(attributes)](permitted-attributes.md#transportConnector.attributes) | 
| uniquePropertyMessageEvictionStrategy [(attributes)](permitted-attributes.md#uniquePropertyMessageEvictionStrategy.attributes) | 
| virtualDestinationInterceptor [(child collection elements)](permitted-collections.md#virtualDestinationInterceptor.collections) | 
| virtualTopic [(attributes)](permitted-attributes.md#virtualTopic.attributes) | 
| vmCursor | 
| vmDurableCursor | 
| vmQueueCursor | 

# Elements and Their Attributes Permitted in Amazon MQ Configurations
<a name="permitted-attributes"></a>

The following is a detailed listing of the elements and their attributes permitted in Amazon MQ configurations. For more information, see [XML Configuration](http://activemq.apache.org/xml-configuration.html) in the Apache ActiveMQ documentation.

Use the scroll bars to see the rest of the table.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/permitted-attributes.html)

## Amazon MQ Parent Element Attributes
<a name="parent-element-details"></a>

The following is a detailed explanation of parent element attributes. For more information, see [XML Configuration](http://activemq.apache.org/xml-configuration.html) in the Apache ActiveMQ documentation.

**Topics**
+ [

### broker
](#broker-element)

### broker
<a name="broker-element"></a>

`broker` is a parent collection element. 

#### Attributes
<a name="broker-attributes"></a>

##### networkConnectionStartAsync
<a name="networkConnectionStartAsync"></a>

To mitigate network latency and to allow other networks to start in a timely manner, use the `<networkConnectionStartAsync>` tag. The tag instructs the broker to use an executor to start network connections in parallel, asynchronous to a broker start.

**Default:** `false`

#### Example Configuration
<a name="networkConnectorStartAsync"></a>

```
<broker networkConnectorStartAsync="false"/>
```

# Elements, Child Collection Elements, and Their Child Elements Permitted in Amazon MQ Configurations
<a name="permitted-collections"></a>

The following is a detailed listing of the elements, child collection elements, and their child elements permitted in Amazon MQ configurations. For more information, see [XML Configuration](http://activemq.apache.org/xml-configuration.html) in the Apache ActiveMQ documentation.

Use the scroll bars to see the rest of the table.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazon-mq/latest/developer-guide/permitted-collections.html)

# Amazon MQ Child Element Attributes
<a name="child-element-details"></a>

The following is a detailed explanation of child element attributes. For more information, see [XML Configuration](http://activemq.apache.org/xml-configuration.html) in the Apache ActiveMQ documentation.

**Topics**
+ [

## authorizationEntry
](#authorizationEntry)
+ [

## networkConnector
](#networkConnector)
+ [

## kahaDB
](#kahaDB)
+ [

## systemUsage
](#systemUsage)

## authorizationEntry
<a name="authorizationEntry"></a>

`authorizationEntry` is a child of the `authorizationEntries` child collection element.

### Attributes
<a name="admin-read-write-attributes"></a>

#### admin\$1read\$1write
<a name="admin-read-write"></a>

The permissions granted to a group of users. For more information, see [Always configure an authorization map](using-amazon-mq-securely.md#always-configure-authorization-map).

If you specify an authorization map which doesn't include the `activemq-webconsole` group, you can't use the ActiveMQ Web Console because the group isn't authorized to send messages to, or receive messages from, the Amazon MQ broker.

**Default:** `null`

### Example Configuration
<a name="admin-read-write-example"></a>

```
<authorizationPlugin>
                                <map>
                                    <authorizationMap>
                                        <authorizationEntries>
                                            <authorizationEntry admin="admins,activemq-webconsole" read="admins,users,activemq-webconsole" write="admins,activemq-webconsole" queue=">"/>
                                            <authorizationEntry admin="admins,activemq-webconsole" read="admins,users,activemq-webconsole" write="admins,activemq-webconsole" topic=">"/>
                                        </authorizationEntries>
                                    </authorizationMap>
                                </map>
                                </authorizationPlugin>
```

**Note**  
 The `activemq-webconsole` group in ActiveMQ on Amazon MQ has admin permissions on all queues and topics. All users in this group will have admin access. 

## networkConnector
<a name="networkConnector"></a>

`networkConnector` is a child of the `networkConnectors` child collection element.

**Topics**
+ [

### Attributes
](#networkConnector-attributes)
+ [

### Example Configurations
](#networkConnector-example)

### Attributes
<a name="networkConnector-attributes"></a>

#### conduitSubscriptions
<a name="conduitSubscriptions"></a>

Specifies whether a network connection in a network of brokers treats multiple consumers subscribed to the same destination as one consumer. For example, if `conduitSubscriptions` is set to `true` and two consumers connect to broker B and consume from a destination, broker B combines the subscriptions into a single logical subscription over the network connection to broker A, so that only a single copy of a message is forwarded from broker A to broker B. 

**Note**  
Setting `conduitSubscriptions` to `true` can reduce redundant network traffic. However, using this attribute can have implications for the load-balancing of messages across consumers and might cause incorrect behavior in certain scenarios (for example, with JMS message selectors or with durable topics).

**Default:** `true`

#### duplex
<a name="duplex"></a>

Specifies whether the connection in the network of brokers is used to produce *and* consume messages. For example, if broker A creates a connection to broker B in non-duplex mode, messages can be forwarded only from broker A to broker B. However, if broker A creates a duplex connection to broker B, then broker B can forward messages to broker A without having to configure a `<networkConnector>`.

**Default:** `false`

#### name
<a name="name"></a>

The name of the bridge in the network of brokers.

**Default:** `bridge`

#### uri
<a name="uri"></a>

The wire-level protocol endpoint for one of two brokers (or for multiple brokers) in a network of brokers.

**Default:** `null`

#### username
<a name="username"></a>

The username common to the brokers in a network of brokers.

**Default:** `null`

### Example Configurations
<a name="networkConnector-example"></a>

**Note**  
When using a `networkConnector` to define a network of brokers, don't include the password for the user common to your brokers.

#### A Network of Brokers with Two Brokers
<a name="example-network-of-brokers-two-brokers"></a>

In this configuration, two brokers are connected in a network of brokers. The name of the network connector is `connector_1_to_2`, the username common to the brokers is `myCommonUser`, the connection is `duplex`, and the OpenWire endpoint URI is prefixed by `static:`, indicating a one-to-one connection between the brokers.

```
<networkConnectors>
                                    <networkConnector name="connector_1_to_2" userName="myCommonUser" duplex="true"
                                        uri="static:(ssl://b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9-1.mq.us-east-2.amazonaws.com:61617)"/>
                                    </networkConnectors>
```

For more information, see [Step 2: Configure Network Connectors for Your Broker](amazon-mq-creating-configuring-network-of-brokers.md#creating-configuring-network-of-brokers-configure-network-connectors).

#### A Network of Brokers with Multiple Brokers
<a name="example-network-of-brokers-multiple-brokers"></a>

In this configuration, multiple brokers are connected in a network of brokers. The name of the network connector is `connector_1_to_2`, the username common to the brokers is `myCommonUser`, the connection is `duplex`, and the comma-separated list of OpenWire endpoint URIs is prefixed by `masterslave:`, indicating a failover connection between the brokers. The failover from broker to broker isn't randomized and reconnection attempts continue indefinitely.

```
<networkConnectors>
                                    <networkConnector name="connector_1_to_2" userName="myCommonUser" duplex="true"
                                        uri="masterslave:(ssl://b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9-1.mq.us-east-2.amazonaws.com:61617,
                                        ssl://b-9876l5k4-32ji-109h-8gfe-7d65c4b132a1-2.mq.us-west-2.amazonaws.com:61617)"/>
                                    </networkConnectors>
```

**Note**  
We recommend using the `masterslave:` prefix for networks of brokers. The prefix is identical to the more explicit `static:failover:()?randomize=false&maxReconnectAttempts=0` syntax.

**Note**  
This XML configuration does not allow spaces.

## kahaDB
<a name="kahaDB"></a>

`kahaDB` is a child of the `persistenceAdapter` child collection element.

### Attributes
<a name="kahaDB-attributes"></a>

#### concurrentStoreAndDispatchQueues
<a name="concurrentStoreAndDispatchQueues"></a>

Specifies whether to use concurrent store and dispatch for queues. For more information, see [Disable Concurrent Store and Dispatch for Queues with Slow Consumers](best-practices-activemq.md#disable-concurrent-store-and-dispatch-queues-flag-slow-consumers).

**Default:** `true`

#### cleanupOnStop
<a name="cleanupOnStop"></a>

**Supported in**  
Apache ActiveMQ 15.16.x and above

If deactivated, garbage collection and cleanup does not take place when the broker is stopped, which speeds up the shutdown process. The increased speed is useful in cases with large databases or scheduler databases.

**Default:** `true`

#### journalDiskSyncInterval
<a name="journalDiskSyncInterval"></a>

Interval (ms) for when to perform a disk sync if `journalDiskSyncStrategy=periodic`. For more information, see the [Apache ActiveMQ kahaDB documentation](https://activemq.apache.org/kahadb).

**Default:** `1000`

#### journalDiskSyncStrategy
<a name="journalDiskSyncStrategy"></a>

**Supported in**  
Apache ActiveMQ 15.14.x and above

Configures the disk sync policy. For more information, see the [Apache ActiveMQ kahaDB documentation](https://activemq.apache.org/kahadb).

**Default:** `always`

**Note**  
The [ActiveMQ documentation](https://activemq.apache.org/kahadb) states that the data loss is limited to the duration of `journalDiskSyncInterval`, which has a default of 1s. The data loss can be longer than the interval, but it is difficult to be precise. Use caution. 

#### preallocationStrategy
<a name="preallocationStrategy"></a>

Configures how the broker will try to preallocate the journal files when a new journal file is needed. For more information, see the [Apache ActiveMQ kahaDB documentation](https://activemq.apache.org/kahadb).

**Default:** `sparse_file`

### Example Configuration
<a name="kahaDB-example"></a>

**Example**  

```
<broker xmlns="http://activemq.apache.org/schema/core">
                                <persistenceAdapter>
                                <kahaDB preallocationStrategy="zeros" concurrentStoreAndDispatchQueues="false" journalDiskSyncInterval="10000" journalDiskSyncStrategy="periodic"/>
                            </persistenceAdapter>
                            </broker>
```

## systemUsage
<a name="systemUsage"></a>

`systemUsage` is a child of the `systemUsage` child collection element. It controls the maximum amount of space the broker will use before slowing down producers. For more information, see [Producer Flow Control](http://activemq.apache.org/producer-flow-control.html) in the Apache ActiveMQ documentation. 

### Child Element
<a name="systemUsage-child"></a>

#### memoryUsage
<a name="memoryUsage"></a>

 `memoryUsage` is a child of the `systemUsage` child element. It manages memory usage. Use `memoryUsage` to keep track of how much of something is being used so that you can control working set usage productively. For more information, see [the schema](http://activemq.apache.org/schema/core/activemq-core-5.15.12-schema.html) in the Apache ActiveMQ documentation.

##### Child Element
<a name="memoryUsage-child"></a>

 `memoryUsage` is a child of the `memoryUsage` child element. 

##### Attribute
<a name="memeoryUsage-attribute"></a>

##### percentOfJvmHeap
<a name="percentOfJvmHeap"></a>

Integer between 0 (inclusive) and 70 (inclusive).

*Default:* `70` 

### Attributes
<a name="systemUsage-attributes"></a>

#### sendFailIfNoSpace
<a name="sendFailIfNoSpace"></a>

Sets whether a `send()` method should fail if there is no space free. The default value is false, which blocks the `send()` method until space becomes available. For more information, see the [schema](http://activemq.apache.org/schema/core/activemq-core-5.15.12-schema.html) in the Apache Active MQ documentation.

**Default:** `false`

#### sendFailIfNoSpaceAfterTimeout
<a name="sendFailIfNoSpaceAfterTimeout"></a>

**Default:** `null`

#### Example Configuration
<a name="systemUsage-example"></a>

**Example**  

```
<broker xmlns="http://activemq.apache.org/schema/core">
                                <systemUsage>
                                <systemUsage sendFailIfNoSpace="true" sendFailIfNoSpaceAfterTimeout="2000">
                                    <memoryUsage>
                                        <memoryUsage  percentOfJvmHeap="60" />
                                    </memoryUsage>>
                                </systemUsage>
                                </systemUsage>
                            </broker>
                            </persistenceAdapter>
```