Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support new JetStream API #1035

Open
dan-j opened this issue Apr 18, 2024 · 1 comment
Open

Support new JetStream API #1035

dan-j opened this issue Apr 18, 2024 · 1 comment

Comments

@dan-j
Copy link
Contributor

dan-j commented Apr 18, 2024

There's a new (well, 12 months old) SDK for interacting with JetStream, package github.com/nats-io/nats.go/jetstream. It makes things a bit easier for interacting with JetStream so we want to use it in https://github.com/knative-extensions/eventing-natss but there's a different implementation for the underlying message, jetstream.Msg instead of *nats.Msg.

It would be worth adding support to this SDK, but since our github.com/cloudevents/sdk-go/protocol/nats_jetstream/v2.Message implementation exports both the Message struct and the Msg field, it would technically be a breaking change:

// Message implements binding.Message by wrapping an *nats.Msg.
// This message *can* be read several times safely
type Message struct {
Msg *nats.Msg
encoding binding.Encoding
}

This new SDK also requires nats-server >= 2.9.0.

What are people's opinion on this? If interested, should we just add a new package supporting both and deprecate the old one in future? Any ideas on what this package should be?

@simonbos
Copy link

simonbos commented Dec 4, 2024

This seems to be resolved with #1095. However, there is no release tagged yet for this submodule (see pkg.go.dev). Is that deliberate @embano1 ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants