Breaking for implementers: INatsJSContext, INatsJSStream and INatsSvcServer gained members (push consumer creation and RemoveEndpointAsync). Anything implementing these interfaces directly, such as a test double, needs updating. Callers are unaffected. Default implementations are not possible while the client targets netstandard2.0.
New:
- Public push consumer API:
INatsJSPushConsumer,NatsJSPushConsumerOptsandCreatePushConsumerAsync,CreateOrUpdatePushConsumerAsync,GetPushConsumerAsyncandCreateOrderedPushConsumerAsyncon the JetStream context and stream. Pull operations on a push consumer throwNatsJSProtocolException(#1231) - Opt-in case-sensitive header handling via
NatsOpts.CaseSensitiveHeaders. Headers stay case-insensitive by default (#1258) - Service endpoints can be stopped individually with
INatsSvcServer.RemoveEndpointAsync(#1255) NatsJsonSerializeracceptsJsonWriterOptionsalongsideJsonSerializerOptions(#1253)NatsKVPurgeOpts.RetainRecentlyDeletedKeyHistorykeeps the history of recently deleted keys when purging delete markers (#1252)
Fixed:
- KV reads on buckets with
AllowDirectdisabled:GetEntryAsyncwith a revision threw "Unexpected subject", and deleted or purged keys came back as livePutentries (#1240)
Thanks to @Ivandemidov00 for the push consumer API, @adamjones2 for the service endpoint, serializer and KV purge changes, @jeacott1 for the header handling, and @fresh55 for reporting and fixing the KV read bug.