Open khanakia opened 2 years ago
The watermill nats implementation actually doesn't support NATS 😆It targets the deprecated nats-streaming server https://github.com/nats-io/nats-streaming-server
I don't know about nats-streaming and it's STAN client but message.Reply
is pretty easy to implement for both NATS core and jetstream using the nats.go client. I think it would be simple with the rabbitmq client also, less sure about others. I have a PR open that's a little awkward to use at the moment since it introduces a v2, but looking at the code might give some ideas https://github.com/ThreeDotsLabs/watermill-nats/pull/8
It's not really NATS-based (as we are trying to keep Watermill Pub/Sub-agnostic), but in this PR I'm introducing Request/Reply that can work with any Pub/Sub implementation: https://github.com/ThreeDotsLabs/watermill/pull/397 (so with NATS as well if needed, just without using native mechanism).
I could not find any docs for the request reply pattern using watermill