nats-io / nats.net.v1

The official C# Client for NATS
Apache License 2.0
646 stars 154 forks source link

KV Atomic Delete and Purge #872

Closed scottf closed 6 months ago

scottf commented 6 months ago

https://github.com/nats-io/nats-architecture-and-design/issues/271 https://github.com/nats-io/nats.java/issues/1091

What's in this patch?

  1. New public methods in IKeyValue for delete and purge with optimistic concurrency support:

    void Delete(String key, ulong expectedRevision);
    void Purge(String key, ulong expectedRevision);
  2. New unit test TestAtomicDeletePurge with positive and negative cases.