20.6.4. Paging Mode

When messages delivered to an address exceed the configured size, that address goes into "page/paging mode".

Note

Paging is done individually per address. If you configure a max-size-bytes for an address, it means each matching address will have a maximum size that you specified. However it does not mean that the total overall size of all matching addresses is limited to max-size-bytes.
You can configure the maximum size in bytes (max-size-bytes) for an address in server configuration files (standalone.xml and domain.xml):
<address-settings>
   <address-setting match="jms.someaddress">
      <max-size-bytes>104857600</max-size-bytes>
      <page-size-bytes>10485760</page-size-bytes>
      <address-full-policy>PAGE</address-full-policy>
   </address-setting>
</address-settings>
The following table describes the parameters on the address settings:

Table 20.4. Paging Address Settings

Element Default Value Description
max-size-bytes 10485760
This is used to specify the maximum memory size the address can have before entering nto paging mode
page-size-bytes 2097152
This is used to specify the size of each page file used on the paging system
address-full-policy PAGE
This value of this attribute is used for paging decisions. You can set either of these values for this attribute: PAGE: To enable paging and page messages beyond the set limit to disk, DROP: To silently drop messages which exceed the set limit, FAIL: To drop messages and send an exception to client message producers, BLOCK: To block client message producers when they send messages beyond the set limit
page-max-cache-size 5
The system will keep page files up to page-max-cache-size in memory to optimize Input/Output during paging navigation

Important

If you don't want to page messages when the maximum size is reached, you may choose to configure an address in order to simply drop messages, drop messages with an exception on client side or block producers from sending further messages, by setting the address-full-policy to DROP, FAIL and BLOCK respectively. In the default configuration, all addresses are configured to page messages after an address reaches max-size-bytes.
Addresses with Multiple Queues

When a message is routed to an address that has multiplte queues bound to it, there is only a single copy of the message in memory. Each queue only handles a reference to this original copy of the message. Thus the memory is freed up only when all the queues referencing the original message, have delivered the message.

Note

A single lazy queue/subscription can reduce the Input/Output performance of the entire address as all the queues will have messages being sent through an extra storage on the paging system.