watermill icon indicating copy to clipboard operation
watermill copied to clipboard

Does watermill supports request reply pattern using NATS ?

Open khanakia opened this issue 3 years ago • 2 comments
trafficstars

I could not find any docs for the request reply pattern using watermill

khanakia avatar Sep 09 '22 20:09 khanakia

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

AlexCuse avatar Nov 30 '22 01:11 AlexCuse

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).

roblaszczak avatar Sep 23 '23 11:09 roblaszczak