ActiveMQ Configuration

Consult activemq.properties in GIT to get some examples and hints.

Use this configuration to configure ActiveMQ AQMP. It is only applicable with Guice products.

ActiveMQ Metrics Configuration

ActiveMQ offers some metrics that are available via statistics plugin (see https://activemq.apache.org/statisticsplugin.html):

  • Broker statistics: metrics about the broker itself such as memoryUsage, maxEnqueueTime, consumerCount etc. Those metrics can be used for monitoring and alerting (e.g. Prometheus).
  • Queue statistics: For each created queue statistics will be collected, too. Usually, the queues spool and outgoing are available, but are not limited to. Having multiple RemoteDelivery mailets in place, then multiple outgoing-* queues can be available.

Basically, the metric collector sends an AQMP message to ActiveMQ requesting the statistics mentioned above. ActiveMQ responds with a message containing those statistics.

Metrics Configuration

metrics.enabled
Enable collecting metrics (default: true)
metrics.start_delay (default: 1s, minimum: 1s)
Add a delay before starting collecting metrics on James' startup. You may increase this value if the embedded ActiveMQ takes long to start.
metrics.interval (default: 5s, minimum: 5s)
Define the interval how often the metrics should be collected.
metrics.timeout (default: 2s, minimum: 2s)
Timeout used by the collector to wait for an ActiveMQ response to arrive. This timeout is useful if the AQMP timeout (i.e. receive timeout) is not considered (see below).
metrics.aqmp_timeout (default: 1s, minimum: 1s)
AQMP timeout (i.e. receive timeout) used by the collector when sending an AQMP message. If the prefetch policy (ActiveMQ connection option) is zero, then the receive timeout is indefinite. Thus, the option metrics.timeout helps to have an additional timeout in place.
When James is not under heavy requesting and receiving statistics takes 50-80ms (mean).