انتقل إلى المحتوى الرئيسي

Function: streamConfig()

streamConfig(name): DeclaredStreamConfig

Defined in: packages/messaging/src/streams.ts:149

The configuration of one stream.

File storage and discard: New: a full stream refuses new messages rather than dropping old ones. A producer's outbox relay marks a row published only on the broker's acknowledgement, so a refused publish leaves the row to go out once there is room, and nothing is lost. Deletion and purge are denied on the stream itself, on top of the broker permissions that already withhold them.

Retention is the permission table's, read through streamRetention, so the table, verifyEstate and the broker cannot disagree about it. Most streams keep a message until a bound pushes it out (limits). PROVISIONING and PLACEMENT are work queues: a message is removed when its one consumer acknowledges it, which is what makes their message caps count the backlog. deny_delete and deny_purge do not get in the way of that removal; they refuse the delete and purge API calls, not an acknowledgement.

JetStream does not let an existing stream change to or from work-queue retention. A broker that still holds such a stream under the other policy is therefore refused by declareStreams, with what the operator has to do, and by the stream's reader at start (openConsumer compares retention like every declared field).

Parameters​

name​

"AUDIT" | "GOVERNANCE" | "TRUST" | "PROVISIONING" | "PLACEMENT" | "ISSUANCE"

Returns​

DeclaredStreamConfig

A fresh object, safe to modify.