Skip to content
This repository was archived by the owner on Oct 24, 2021. It is now read-only.

Commit be14857

Browse files
committed
Update NO_MERGE description of client handling duplicate messages
1 parent 4310121 commit be14857

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/api/pubsub.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ stay subscribed to your private messages.
263263

264264
## Publication strategies
265265

266+
> The following features are available from Meteor 2.4 or `ddp-server@2.5.0`
267+
266268
Once you start scaling your application you might want to have more control on how the data from publications is being handled on the client.
267269
There are three publications strategies:
268270

@@ -280,6 +282,13 @@ This should only be chosen for special use cases like send-and-forget queues.
280282
sent to the client so it can remove them when a subscription is stopped.
281283
This strategy can be used when a collection is only used in a single publication.
282284

285+
When `NO_MERGE` is selected the client will be handling gracefully duplicate events without throwing an exception.
286+
Specifically:
287+
288+
* When we receive an added message for a document that is already present in the client's collection, it will be changed.
289+
* When we receive a change message for a document that is not in the client's collection, it will be added.
290+
* When we receive a removed message for a document that is not in the client's collection, nothing will happen.
291+
283292
You can import the publication strategies from `DDPServer`.
284293

285294
```js

0 commit comments

Comments
 (0)