ClusterSubscriptionReplayMode
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
ClusterSubscriptionReplayMode =
"events"|"snapshot"
Defined in: src/cluster/Cluster.ts:103
How Cluster.subscribe states the membership that already exists when a listener attaches (#161).
'events'(default) — the current membership as the events that would have built it: oneMemberJoinedper member, followed by the status event that member has already reached, thenLeaderChanged. A listener written for the live stream handles the replay with the same code and needs no initial-state branch.'snapshot'— one CurrentClusterState, whatever the cluster’s size. Pick it when the listener wants to know where things stand rather than to re-live how they got there: it is one callback instead of one per member, and it marks where the replay ends, which the event form cannot.
The default stays 'events' because it is what every existing subscriber
was written against, not because it is the better choice for new code.
