Closed peteclark3 closed 5 years ago
I think you could implement this using the filter
option if you wanted to.
const seqMap = new WeakMap();
server.subscription('/item', {
filter: function (path, message, options) {
const seq = (seqMap.get(options.socket) || 0) + 1;
seqMap.set(options.socket, seq);
const override = Object.assign({}, message, { seq });
return { override };
}
});
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Just wondering if anyone has tried to implement a sequence number as part of every subscription payload that is sent (unique per subscribed client, starting at 0 for new connections).. or if this is available in here somewhere and I'm missing it?