nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

[FIXED] (2.11) Propose message delete for clustered interest stream #6140

Open MauriceVanVeen opened 3 days ago

MauriceVanVeen commented 3 days ago

For an Interest or WorkQueue stream messages will be removed once all consumers that need to receive a message have acked it.

For a clustered stream each consumer would ack and remove a message by themselves. This can be problematic since that introduces different ordering between servers. For example when using DiscardOld with MaxMsgs, which could result in stream desync. Proposing the message removal ensures ordering between servers.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

MauriceVanVeen commented 3 days ago

Putting on draft for now, to look into what happens if we receive it as pre-ack and if it then still correctly does the message delete.

MauriceVanVeen commented 1 day ago

We've discussed this and agreed on the direction. Will need to look into the upgrade path for this at least.