-
|
Since NATS offers a first-class concept of services, I would expect the library to offer a way to send requests to endpoints directly. I can't find one though. It looks like the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
You simply use the 'request' call on your NATS connection object, not part of the |
Beta Was this translation helpful? Give feedback.
You simply use the 'request' call on your NATS connection object, not part of the
servicemodule (which automatically creates an 'inbox' subject, subscribes to it and publishes the request message on the specified subject (i.e. what your service end point subscribes to) with that inbox subject in the 'reply' field of the message. The request call is synchronized and will block until the reply is received, or time out.