Explore NATS Request/Reply
最后更新于
这有帮助吗?
最后更新于
这有帮助吗?
NATS supports messaging. In this tutorial you explore how to exchange point-to-point messages using NATS.
Go and the NATS server should be installed.
You will use these sessions to run the NATS request and reply clients.
You should see the message: Listening on [help.please]
This means that the NATS receiver client is listening for requests messages on the "help.please" subject. In NATS, the receiver is a subscriber.
The NATS requestor client makes a request by sending the message "I need help!" on the “help.please” subject.
The NATS receiver client receives the message, formulates the reply ("OK, I CAN HELP!!!"), and sends it to the inbox of the requester.