-
-
Couldn't load subscription status.
- Fork 968
Add support for NATS JetStream as a transport #2299
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds initial support for NATS JetStream as a Kombu transport, including dependency, transport registration, and usage examples.
- Adds
nats-pyextra requirement - Registers the
natstransport in Kombu’s transport registry - Provides example scripts for sending and receiving messages via NATS JetStream
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| requirements/extras/nats.txt | Pins the nats-py[nkeys] dependency |
| kombu/transport/init.py | Registers 'nats' transport for JetStream |
| examples/nats_send.py | Example for publishing messages to JetStream |
| examples/nats_receive.py | Example for consuming messages from JetStream |
Comments suppressed due to low confidence (1)
kombu/transport/init.py:48
- [nitpick] The transport key 'nats' is generic and could conflict with other NATS-based transports; consider renaming it to 'nats_jetstream' to clearly distinguish this implementation.
'nats': 'kombu.transport.nats_jetstream:Transport',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ping me when the PR is ready for review. Thank you for working on this!
a263b01 to
f2df5f1
Compare
@Nusnus ready for review! |
for more information, see https://pre-commit.ci
|
tried to fix the merge conflicts, but feel free to improve it |
|
Thanks @auvipy, I fixed tox.ini but otherwise the merge looks good |
|
Just wanted to spread the love. So looking forward for this integration! |
closes #2103
Implement support for NATS using its built-in persistence layer JetStream.
Example
You can test using either:
nats-server --jsdemo.nats.ioThe transport can be test using
examples/nats_receive.pyandexamples/nats_send.py:python -m examples.nats_receive(append--demoif using the demo server)python -m examples.nats_send(append--demoif using the demo server)In the receive window, you should see something like: