> When artemis broker starts up, does it need to first load all persistent
messages in memory to be ready for normal broker operations?

Among other things, the broker will parse and load messages persisted to
the journal. However, it won't parse and load messages persisted to paging.
Pages aren't parsed until the queue is empty and more messages are needed.

In general, you can think of the journal as an up-to-date snapshot of what
is in the heap. It includes address & queue definitions, messages,
transaction meta-data, duplicate ID caches, etc.

> if we stop broker with viz. 4 GB of persistent pending messages, does it
need min 4 GB of free memory at startup to load these messages?

If you stop the broker with 4GB of persistent pending messages then after
you restart the broker and reload the messages you'll have that same 4GB of
persistent pending messages.

> If it uses heap memory for this work or non-heap memory is used for this?

It uses heap.

I think I answered #3 in the answer to #1 above.

> If a message is of 10KB, does broker need exact 10KB to store the
messages in memory and disk? Or additional space is needed for metadata or
encoding etc.?

There's always some additional space required for metadata, etc.


Justin

On Tue, Jan 6, 2026 at 5:09 AM Shiv Kumar Dixit <
[email protected]> wrote:

> We are hosting Artemis broker in Kubernetes using operator-based solution.
> We deploy the broker as statefulset with 2 or 4 replicas. We assign for
> e.g. 6 GB for heap and 9 GB for pod, 1.2 GB (1/5 of max heap) for
> global-max-size. All addresses normally use -1 for max-size-bytes but some
> less frequently used queues are defined with 100KB for max-size-bytes to
> allow early paging.
>
> We need some information or documentation link to address following
> queries.
>
>
>
> 1. When artemis broker starts up, does it need to first load all
> persistent messages in memory to be ready for normal broker operations?
> E.g. if we stop broker with viz. 4 GB of persistent pending messages, does
> it need min 4 GB of free memory at startup to load these messages?
> 2. If it uses heap memory for this work or non-heap memory is used for
> this?
> 3. If we have defined global-max-size of 1.2 GB and address-full-policy is
> PAGE and broker has 4 GB of persistent pending messages, will broker first
> load 1.2 GB of messages in memory from all addresses for faster delivery
> and rest messages will remains on disk? Or first all messages must be
> loaded in memory and then paging starts afterwards by keeping 1.2 GB in
> memory and pushing rest to disk again?
> 4. If a message is of 10KB, does broker need exact 10KB to store the
> messages in memory and disk? Or additional space is needed for metadata or
> encoding etc.?
>
>
>
>
>
> Best Regards,
>
> Shiv
>
>
>

Reply via email to