#Optimize #Jboss EAP 7.x embedded #Artemis messaging server for high volumes

By | February 23, 2022

There are several configurations that will prepare the embedded Jboss EAP 7.x Artemis messaging server for a production environment with high volumes. The following is a non exhaustive list of optimizations I discovered during several performance tests. Most of the settings is assumed that are done from jboss-cli.

Disable client pre-fetch of messages:

This will make sure that we do not have any pre-fetch buffer for clients. This will eliminate resource overrun and will also accommodate slow clients. Set this for both the internal and remote connection factory.


Increase Producer pre-fetch window size

Limiting the window size sets a limit on the number of bytes that the producer can have “in-flight” at any one time, which can prevent the remote connection from becoming overloaded.

The default value for this pre-fetch buffer is very small. When this buffer was to small I frequently got the “AMQ212054 Destination address={0} is blocked …” error caused by the flow control that blocks a queue when a producer puts messages to fast in a short time. Again do this on both internal and remote connection factories.


Configuring Artemis Messaging Journal JDBC Persistence Store

The default Artemis message journal is on disk. In case the journal is not on some dedicated SSD it can be very slow. Even worse if the journal is on some remote storage shared data directory the performance can be horrible.

Luckily if we use a newer database, in case of Oracle at least 12c, we can move the journal to the database.

To put the journal in the database simply add the following and indicate the data source:


To make sure tables are correctly created in all databases (some have restrictions for table names that not always are respected by the automatic names given by Jboss) do the following.


When creating the default address setting (# wildcard matches all addresses, so the defined resource limits and policies are applied to all messages) and the journal is in database make sure to do the following:

  • set a high value for “max-size-bytes” (100MB in my case). This sets the memory limit for the address at a high enough value. The default is -1 (no limit).
  • change “address-full-policy” to BLOCK from the default PAGING.
  • Note that PAGING is incompatible with the journal in the database so must be disabled. Also remove any paging related parameter like “page-size-bytes”
  • Note that “max-size-bytes” in this case is the size at which the producer will be throttled, when "address-full-policy" is set to BLOCK.

All the above can be done also when creating the default address as:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.