kombu icon indicating copy to clipboard operation
kombu copied to clipboard

Add support for NATS JetStream as a transport

Open joeriddles opened this issue 6 months ago • 1 comments

closes #2103

Implement support for NATS using its built-in persistence layer JetStream.

Example

You can test using either:

  • Installing the NATS server locally and running it with JetStream enabled: nats-server --js
  • Using the demo NATS server at demo.nats.io

The transport can be test using examples/nats_receive.py and examples/nats_send.py:

  1. Start the local NATS server (optional)
  2. Run python -m examples.nats_receive (append --demo if using the demo server)
  3. In another window, run python -m examples.nats_send (append --demo if using the demo server)

In the receive window, you should see something like:

Received message: 'hello world'
  properties:
{   'body_encoding': 'base64',
    'delivery_info': {'exchange': 'exchange', 'routing_key': 'messages'},
    'delivery_mode': 2,
    'delivery_tag': 'fa01f1a9-f666-46a0-af71-35e5164e1ad9',
    'priority': 0}
  delivery_info:
{'exchange': 'exchange', 'routing_key': 'messages'}

joeriddles avatar May 16 '25 15:05 joeriddles

Please ping me when the PR is ready for review. Thank you for working on this!

@Nusnus ready for review!

joeriddles avatar Jun 11 '25 02:06 joeriddles

@Nusnus @auvipy I fixed the merge conflicts and rebased on main

joeriddles avatar Oct 17 '25 20:10 joeriddles

tried to fix the merge conflicts, but feel free to improve it

auvipy avatar Oct 23 '25 08:10 auvipy

Thanks @auvipy, I fixed tox.ini but otherwise the merge looks good

joeriddles avatar Oct 23 '25 16:10 joeriddles

Just wanted to spread the love. So looking forward for this integration!

maxyloon avatar Oct 25 '25 13:10 maxyloon