protobuf-NATS-request-reply-goroutines example
Same as protobuf-NATS-request-reply
but using goroutines for subscribers.
This is also a model for one-to-one communication.
These are my 6 main example of using protobuf,
Table of contents,
Documentation and reference,
GitHub Webpage
REFER TO PREVIOUS EXAMPLE
This example is exactly the same as the previous example
protobuf-NATS-request-reply,
but uses goroutines for subscribers (server).
Because of the goroutine channel it will mimic
one-to-one communication.
Refer to that example for all information.
RUN
Start nats-server,
nats-server -v
nats-server -DV -p 4222 -a 127.0.0.1
In separate windows run,
cd client
go run client.go messages.pb.go
cd server
go run server.go messages.pb.go
HIGH-LEVEL ILLUSTRATION
This illustration may help show what we did,