Configure NATS JetStream File Storage With Retention Limits
How to set max_age and max_bytes on a NATS JetStream file store to bound disk usage and control message retention.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
How to set max_age and max_bytes on a NATS JetStream file store to bound disk usage and control message retention.
Goal Prevent unauthenticated clients from publishing to any subject while using JetStream’s ACL configuration. Current Constraint The NATS server treats an unauthenticated connection as the special public user. If the ACL file does not contain an explicit deny rule for this user, the default behavior is permissive—any client can publish to any subject. Unres
JetStream Stream Retention Policy Precedence When configuring a JetStream stream with multiple retention limits— MaxBytes , MaxMsgs , and MaxAge —the NATS server accepts the settings without error but does not document a clear rule for which limit is evaluated first during message ingestion. This ambiguity can lead to unexpected eviction behavior, especially
Goal: Run integration tests against a NATS server started with no authentication configuration so that test clients do not need production credentials. Constraint: When auth is disabled, the server ignores any username/password or token supplied by a client and logs only the remote address, providing no client identity. This makes it difficult to attribute p
Goal We are moving a NATS JetStream deployment from server 2.9.x to 2.10.x and need to settle on a pagination design for reading a large stream (millions of messages) from a service that answers "give me the next page of history" requests. NATS core has no query or offset/limit semantics, so the plan is to use pull consumer Fetch calls with bounded batch siz
NATS JetStream utilizes a dedicated disk store to maintain stream persistence across server restarts. In a clustered environment, Raft consensus manages the replication of this state, allowing for rolling upgrades of the nats-server binary. A technical uncertainty exists regarding the behavior of the store format when a server is reverted to a previous versi
When running a NATS server locally with mutual TLS, administrators often point both the server certificate and the client verification trust store to the same self‑signed CA file, and connections succeed. In a production environment that uses a certificate chain signed by a public or internal CA, the same configuration sometimes fails because the server appe
When restoring a JetStream stream from a snapshot backup, the interaction between the backup format version and the target server release creates a compatibility boundary affecting stream data and consumer state. Snapshots created with NATS 2.10 include a version header in the backup format, and the nats-restore tool is documented to restore snapshots only t
NATS JetStream utilizes the MaxAckPending configuration to limit the number of unacknowledged messages a consumer can have outstanding. This mechanism is critical for preventing consumer saturation and managing resource allocation on the server. When using Pull Consumers with AckExplicit , the client controls the request rate via batch sizes. However, there