maxbytes
Topics and queues can specify the maxbytes property in the form:
maxbytes=value[KB|MB|GB]
where value is the number of bytes. For example:
maxbytes=1000
Means 1000 bytes.
You can optionally include a KB, MB or GB after the number to specify kilobytes, megabytes, or gigabytes, respectively. For example:
maxbytes=1000KB
Means 1000 kilobytes.
For queues, maxbytes defines the maximum size (in bytes) that the queue can store, summed over all messages in the queue. Should this limit be exceeded, messages will be rejected by the server and the message producer send calls will return an error (see also overflowPolicy). For example, if a receiver is off-line for a long time, then the queue size could reach this limit, which would prevent further memory allocation for additional messages.
If maxbytes is zero, or is not set, the server does not limit the memory allocation for the queue.
You can set both maxmsgs and maxbytes properties on the same queue. Exceeding either limit causes the server to reject new messages until consumers reduce the queue size to below these limits.
For topics, maxbytes limits the maximum size (in bytes) that the topic can store for delivery to each durable or non-durable online subscriber on that topic. That is, the limit applies separately to each subscriber on the topic. For example, if a durable subscriber is off-line for a long time, pending messages accumulate until they exceed maxbytes; when the subscriber consumes messages (freeing storage) the topic can accept additional messages for the subscriber. For a non-durable subscriber, maxbytes limits the number of pending messages that can accumulate while the subscriber is online.
When a destination inherits different values of this property from several parent destinations, it inherits the smallest value.