Open scottf opened 6 months ago
Because of the way the server stacks values during republishes, the last value for each header field is the correct value for direct messages
Nats-Subject Nats-Sequence Nats-Last-Sequence Nats-Time-Stamp Nats-Stream
Create a stream with configuration:
name: "sbname" subjects: "sub.>" republish src: ">" dest: "$KV.sbname.>"
Create a Key Value bucket with bucket name matching the stream name
name: "sbname"
Publish 3 different ways for coverage
Connection Publish: Subject: "sub.1", Payload: "A" JetStream Publish: Subject: "sub.2", Payload: "B" Key Value Put to Bucket: Key: "sub.3", Value: "C"
Retrieve values from the bucket.
KeyValueEntry kve1 = kv.get(publishSubject1); assertEquals("sbname", kve1.getBucket()); assertEquals("sub.1", kve1.getKey()); assertEquals("A", kve1.getValueAsString()); KeyValueEntry kve2 = kv.get(publishSubject2); assertEquals("sbname", kve2.getBucket()); assertEquals("sub.2", kve2.getKey()); assertEquals("B", kve2.getValueAsString()); KeyValueEntry kve3 = kv.get(publishSubject3); assertEquals("sbname", kve3.getBucket()); assertEquals("sub.3", kve3.getKey()); assertEquals("C", kve3.getValueAsString());
Implemented
Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.
Overview
Because of the way the server stacks values during republishes, the last value for each header field is the correct value for direct messages
Clients and Tools
Example Unit Test
Create a stream with configuration:
Create a Key Value bucket with bucket name matching the stream name
Publish 3 different ways for coverage
Retrieve values from the bucket.
Other Tasks
Implemented
Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.