主要设计思路
worker 的 socket 与 worker_backend 沟通, client 的 sockert 与 client_front 沟通。
主要通过 handler 来处理。
这样做的好处: 参见 https://zguide.zeromq.org/docs/chapter3/
It gives us asynchronous clients talking to asynchronous servers, where both sides have full control over the message formats.
Because both DEALER and ROUTER can work with arbitrary message formats, if you hope to use these safely, you have to become a little bit of a protocol designer. At the very least you must decide whether you wish to emulate the REQ/REP reply envelope. It depends on whether you actually need to send replies or not.
好处是不用 REP 和 REQ 模式下,必须 send 和 recv 结对出现。
坏处是不好理解,broker 的方式有点难以调试。