protobuf-NATS-request-reply-goroutines/

directory
v0.0.0-...-a2a1f02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: MIT

README

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,

IMAGE - protobuf-NATS-request-reply-goroutines - IMAGE

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL