-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NATS Jetstream optimistic concurrency headers #1029
Comments
If I understand the current sdk-go/protocol/nats_jetstream/v2/message.go Lines 57 to 97 in e6a74ef
IMHO it can be added without breaking the API similar to what we do in the Kafka protocol bindings. |
I'd be happy with a change to enable this, but not sure on the correct approach. I'm not too familiar to how other protocol bindings work, but http just has an exported struct field: sdk-go/v2/protocol/http/message.go Lines 37 to 49 in 6408c01
If you did something similar, users can then just do the following: var msg binding.Message
if msg, ok := msg.(*jetstreamv2.Message); ok {
fmt.Println(msg.Header)
} |
Hi, folks! Is it possible to access the special NATS headers on send, for example Nats-Expected-Last-Sequence
These headers would allow event sourcing with CloudEvents. The neat thing is that consumers don't need to do anything. It's more like a quality of service between NATS client and the server.
If not currently possible, are there workarounds? Could we find a way to add support without breaking the current API?
The text was updated successfully, but these errors were encountered: