开发者

Sending multiple multipart ZMQ PUB messages in parallel

开发者 https://www.devze.com 2023-01-30 01:41 出处:网络
What is the preferred开发者_StackOverflow中文版 pattern for this? Multiple contexts? Waiting until all patterns for the message are assembled and sending them synchronized?Found a solution:

What is the preferred开发者_StackOverflow中文版 pattern for this? Multiple contexts? Waiting until all patterns for the message are assembled and sending them synchronized?


Found a solution:

  • Each sender connects to an IPC PUSH socket and writes multipart messages to it. When it's done, it closes the socket.
  • A dedicated thread receives on the opposite IPC PULL socket and writes the messages, part-by-part, into one TCP PUB socket.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号