---
title: "The memory state of a Queen node"
description: "Each node keeps queues, partitions, positions, KV, timers and recent dedup records in memory. Messages stay on disk, so memory grows with partitions and keys, not with retained messages."
---

> Queen MQ documentation, for AI agents
> Complete self-contained summary of Queen MQ: https://queenmq.com/llms-brief.txt
> Fetch that first when the question is about the product rather than about this page.
> Index of all pages: https://queenmq.com/llms.txt

# The memory state of a Queen node

Each node keeps its whole state in memory: queues, partitions, consumer positions, KV, timers, request ids, and the dedup records of recent pushes. It is loaded once, at boot.

Messages are not in memory. They stay in the queue log files and are read from there. So memory grows with the number of partitions and keys, and with the pushes of the dedup window, not with how many messages a queue keeps.

**Figure.** In memory, on every node: the state, which is queues, partitions, consumer positions, KV, timers, request ids and the dedup records of recent pushes, loaded once at boot. On disk: the queue log files, which hold every message and are the log itself; store/data.mdb, the LMDB checkpoint of the state, written four times a second and read at boot; and traces/data.mdb, read from disk. Messages are never loaded into memory: they are read from the queue log files.

What lives in memory, and what lives on disk.

Message traces are kept apart, in their own file, and are read from disk.

Source: https://queenmq.com/architecture/memory-state/index.mdx
