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

Function: streamMismatches()

streamMismatches(actual, expected): string[]

Defined in: packages/messaging/src/stream-check.ts:122

The differences between a stream as the broker reports it and as declared. The subject list must match exactly, and none of mirror, sources, republish or subject_transform may be set, since each would be capture (or delivery) by a route other than the stream's own subject list.

retention is one of the declared fields and is compared like the rest. It matters more than a bound does: a work queue declared as one and found under limits retention keeps every acknowledged message, so its message cap would count a month of handled messages and refuse new ones. A reader therefore does not start on it. It is also the one difference an update cannot repair, because JetStream does not change a stream to or from work-queue retention; the stream has to be removed and declared again.

Parameters​

actual​

Partial<StreamConfig>

StreamInfo.config from the broker.

expected​

DeclaredStreamConfig

From streamConfig.

Returns​

string[]

Readable differences; empty when they agree.