Replies: 2 comments
-
You would subscribe to the request subject and reply to the subject provided in the message received. You can check out our tests for examples of these. |
Beta Was this translation helpful? Give feedback.
-
To expand a bit on @sixlettervariables, there is a Request API that essentially publishes and waits for a response on a unique subject. The responder subscribes to a subject, and when it receives a message, it can either publish on the reply subject, or use a convenience method to reply with msg.Respond() The examples demonstrate this: I'd suggest walking through the examples. There's more on request/reply here: https://docs.nats.io/developing-with-nats/sending/request_reply |
Beta Was this translation helpful? Give feedback.
-
Documentation does not provide information about how to respond to the request, and the implementation of Msg class really confused because the Respond method publish(!!!) by the topic but the request subscribe on the same topic as a subscriber and will got this message first, so I don't see any possibility to Respond on Request
Beta Was this translation helpful? Give feedback.
All reactions