Closed ReidWilliams closed 7 years ago
Closing this issue. API now fires callback with argument containing message for each subscription rather than a callback with argument containing messages for all subscriptions. Added "caching" that tracks which messages for each subscription have already been delivered.
Subscribing nodes can mark messages as seen or set an index, low water mark, or other structure that prevents older messages from being delivered more than once.
The current subscribe API fires a single callback whenever any stream has a new message, delivering an array of the latest messages from all streams. This may include messages that the node has already seen if a given stream doesn't have any new messages.
Is this the right API? Should we switch to (or add) one callback per stream?