KubeMQ
ConfigureReference

Storage & Queues

Persistent store limits and retention, plus queue delivery defaults and ceilings.

KubeMQ persists messages through an embedded persistent store and serves pull-based delivery through its queues. The store controls how much is retained and for how long; the queue settings control visibility, wait, delay, expiration, and retry behavior. Each setting is shown for both deployment targets — Docker single-node (config.yaml key · env var) and Kubernetes/Helm (spec.* path). A dash () in the Helm/CRD column means the setting is not available on that surface.

Store and queue tuning is opt-out: the store and queue blocks are internal server sections (not wire connectors), so they are always active with the defaults below — there is no enable/disabled toggle. Override only the fields you need.

Persistent store

Limits and retention for the persistent store. The persistence engine is chosen once at cluster creation — see Storage Engines for the full engine model, durability guarantees, and clustering. Several store fields carry name divergences between the Docker config.yaml key and the Helm/CRD field — the Notes column flags each one. The ten fields below are all CRD-settable under spec.store.*; the store config carries five more — the next-engine settings (nextackpolicy, nextraftaddress, nextsegmentsize, nextshards, nextbalanceleaders), which are config.yaml/env-only and documented on Storage Engines.

SettingTypeDefaultValid valuesDocker (config.yaml key · env var)Helm/CRD pathNotes
Persistence enginestringunset → resolved from the store directory (clean ⇒ next)legacy | next | autostore.engine · STORE_ENGINEspec.store.engine (typed CRD enum)Chosen once, at cluster creation — a cluster is born one mode and stays there; no in-place migration. Unset (or the explicit auto) does not mean legacy: the server probes the store directory and resolves the engine that wrote it, or next for a clean one. To get legacy you must name it. See Zero-config engine selection.
Clean store on startboolfalsetrue / falsestore.cleanstore · STORE_CLEAN_STOREspec.store.clean⚠️ Destructive — wipes the store on every boot. See the warning below. Name divergence: cleanstoreclean. CRD emits STORE_CLEAN_STORE=true only when clean: true; otherwise unset.
Store pathstring./storenon-empty file pathstore.storepath · STORE_STORE_PATHspec.store.pathName divergence: storepathpath. Empty string is rejected. On the legacy engine, absolute paths are rewritten to relative: a leading / is prefixed with . (so /data becomes ./data). On the next engine, an absolute StorePath is honored verbatim (e.g. a mounted PVC path like /store) — no rewrite. This is server-process behavior; on Kubernetes the operator supplies the mount and rejects a leading / in spec.store.path outright (see Deployment) — the two layers aren't in conflict.
Max channelsint0 (∞)≥ 0; 0 = unlimitedstore.maxqueues · STORE_MAX_QUEUESspec.store.maxChannelsName divergence: store.maxqueuesspec.store.maxChannels. Negative rejected. 0 logs a stderr WARNING (unbounded).
Max channel size (bytes)int640 (∞)≥ 0; 0 = unlimitedstore.maxqueuesize · STORE_MAX_QUEUE_SIZEspec.store.maxChannelSizeName divergence: store.maxqueuesizespec.store.maxChannelSize. Type divergence: server field is int64; the CRD field is *int32, so via Helm the max is ~2.1 GB — set larger caps through config.yaml/env. 0 logs a stderr WARNING.
Max messages / channelint0 (∞)≥ 0; 0 = unlimitedstore.maxmessages · STORE_MAX_MESSAGESspec.store.maxMessagesNegative rejected. 0 logs a stderr WARNING.
Max subscribersint0 (∞)≥ 0; 0 = unlimitedstore.maxsubscribers · STORE_MAX_SUBSCRIBERSspec.store.maxSubscribersNegative rejected. 0 logs a stderr WARNING.
Message retention (min)int1440≥ 0 (minutes)store.maxretention · STORE_MAX_RETENTIONspec.store.messagesRetentionMinutesName divergence: store.maxretentionspec.store.messagesRetentionMinutes. Negative rejected.
Purge inactive (min)int1440≥ 0 (minutes)store.maxpurgeinactive · STORE_MAX_PURGE_INACTIVEspec.store.purgeInactiveMinutesName divergence: store.maxpurgeinactivespec.store.purgeInactiveMinutes. Negative rejected.
Idle prune cutoff (hrs)int24≥ 1store.idleprunecutoffhours · STORE_IDLE_PRUNE_CUTOFF_HOURSspec.store.idlePruneCutoffHoursMust be at least 1 (server rejects 0; CRD schema enforces minimum: 1).

store.cleanstore: true deletes the persistent store on every single boot — not once. It is not a one-shot reset. Left in a values.yaml or a config.yaml, every pod roll, node drain, crash-restart, and routine upgrade wipes production data — and every restart looks completely healthy, because deleting the store is exactly what you asked for.

Use it for a deliberate, supervised reset and take it back out immediately. There is no confirmation, no dry-run, and no undo.

Two things bound the damage, neither of which is a safety net you should rely on: the engine-mode guard runs before the wipe, so a mode-mismatched or unrecognized directory fails fast and is never deleted; and on a clustered next cluster the server refuses to wipe a member's datadir outright, telling you to remove the member from the cluster first. A standalone node has neither protection.

Leaving any of Max channels / Max channel size / Max messages / Max subscribers at its default of 0 means unlimited and prints a startup WARNING to stderr — the store places no bound on that dimension, which can drive unbounded memory/disk use in production. Set explicit ceilings for production workloads.

These limits are enforced by the legacy engine only — and next is what a new cluster gets. A fresh install on a clean store resolves to next, so the default deployment enforces no retention at all, including the 1440-minute Message retention and Purge inactive values printed in the table above. Those two rows describe legacy.

On the next engine, Max channels / Max channel size / Max messages / Message retention / Purge inactive are not consumed — a native Events Store or Queues channel has no age, size, or count cap and grows unbounded under a slow or absent consumer. Size next deployments by disk capacity, or use Kafka topic channels (whose retention.ms is age-enforced on next) where eviction matters. See Storage Engines.

Queues

Delivery defaults and ceilings for pull-based queues. Two Docker keys diverge from the Helm/CRD field names — queue.maxreceivecountspec.queue.maxReQueues (the retry ceiling) and queue.maxnumberofmessagesspec.queue.maxReceiveMessagesRequest (the per-request batch). All ten queue fields are fully CRD-settable under spec.queue.*.

SettingTypeDefaultValid valuesDocker (config.yaml key · env var)Helm/CRD pathNotes
Default visibility (s)int3260> 0queue.defaultvisibilityseconds · QUEUE_DEFAULT_VISIBILITY_SECONDSspec.queue.defaultVisibilitySeconds
Default wait timeout (s)int321> 0queue.defaultwaittimeoutseconds · QUEUE_DEFAULT_WAIT_TIMEOUT_SECONDSspec.queue.defaultWaitTimeoutSeconds
Max visibility (s)int3243200> 0queue.maxvisibilityseconds · QUEUE_MAX_VISIBILITY_SECONDSspec.queue.maxVisibilitySeconds43200 s = 12 h.
Max wait timeout (s)int323600> 0queue.maxwaittimeoutseconds · QUEUE_MAX_WAIT_TIMEOUT_SECONDSspec.queue.maxWaitTimeoutSeconds
Max delay (s)int3243200> 0queue.maxdelayseconds · QUEUE_MAX_DELAY_SECONDSspec.queue.maxDelaySeconds43200 s = 12 h.
Max expiration (s)int3243200> 0queue.maxexpirationseconds · QUEUE_MAX_EXPIRATION_SECONDSspec.queue.maxExpirationSeconds43200 s = 12 h.
Retry ceiling (→ DLQ)int321024> 0queue.maxreceivecount · QUEUE_MAX_RECEIVE_COUNTspec.queue.maxReQueuesName divergence: queue.maxreceivecountspec.queue.maxReQueues. Max redeliveries before dead-lettering.
Max messages / receive reqint321024> 0queue.maxnumberofmessages · QUEUE_MAX_NUMBER_OF_MESSAGESspec.queue.maxReceiveMessagesRequestName divergence: queue.maxnumberofmessagesspec.queue.maxReceiveMessagesRequest. Per-request batch ceiling.
Max inflightint322048> 0queue.maxinflight · QUEUE_MAX_INFLIGHTspec.queue.maxInflightMax unacked in-flight messages per queue.
Pub-ack wait (s)int3260> 0queue.pubackwaitseconds · QUEUE_PUB_ACK_WAIT_SECONDSspec.queue.pubAckWaitSecondsPublish-ack wait before the send is considered failed.

Every queue field must be greater than 0 — the server rejects 0 at startup. The CRD schema already enforces this with minimum: 1 on all ten queue fields, so a Helm value of 0 is rejected by the API server and would fail server validation. Treat the effective minimum for every queue setting as 1.

Example

Set message retention on each target. This is a single-setting snippet — see the Docker guide and the Kubernetes guide for complete, runnable configurations.

config.yaml
store:
  maxretention: 1440
values.yaml
store:
  messagesRetentionMinutes: 1440

For the full Docker delivery methods (env vars, mounted config.yaml, the CONFIG variable) see the Docker guide; for values.yaml mapped to the KubemqCluster spec see the Kubernetes guide.

Was this page helpful?

On this page