In Chapter 1 Basics, the ZeroMQ guide has listed three types of patterns. A quick summary is worth the time.
The first is request-reply, where you can do ping-pong from both sides: one side sends request and the other side sends reply.
The second is pub-sub, where a publisher sends message to a set of subscribers. The difference from request-reply is that pub-sub is one way and it’s broadcast, meaning, all subscribers receive the same messages and they only receive, they do not send. Simple.
The third is push-pull (or pipeline), where you can fan-out (or push, hand out) messages to a set of workers. Or a list of workers can fan-in, send messages to a sink (or the sink pulls). The workers are both of role push and pull. This pattern also shows up a lot after you learn to build pipelines in go channel. The difference from pub-sub is obvious: it’s still one way messaging but the pipeline pattern does not broadcast.