richardmillen / zguide-examples

Implementations of the 0MQ examples in the guide.
http://zguide.zeromq.org/page:all
4 stars 0 forks source link

Pub-Sub Message Envelopes in C++ #1

Closed richardmillen closed 7 years ago

richardmillen commented 7 years ago

Implement the Pub-Sub Message Envelopes example.

In the pub-sub pattern, we can split the key into a separate message frame that we call an envelope. If you want to use pub-sub envelopes, make them yourself. It's optional, and in previous pub-sub examples we didn't do this. Using a pub-sub envelope is a little more work for simple cases, but it's cleaner especially for real cases, where the key and the data are naturally separate things.