Best messaging pattern for server that spawns multiple workers
21:21 08 Sep 2026

I'm writing a system in which a server program will spawn multiple worker processes (using CreateProcessA) to work on tasks in parallel. I want to use ZeroMQ to communicate tasks to the workers and communicate progress back to the server. The server will keep track of what worker is working on what task.

My biggest question is what messaging pattern I should use for this kind of communication: router-dealer, router-router, pub-sub, ect.?

As a point of comparison, if I used Win32 named pipes for communication, I could send messages to specific workers using the handle I get from CreateNamedPipe, even if every worker used the same pipe name.

How can I get this behavior with ZeroMQ? I want all workers to send all their messages to the same server, and the server to be able to send messages to specific workers. I don't need broadcasting.

I would like to avoid having the same message sent to multiple peers, as some of the messages can get very large (on the order of several GB).

tooling-recommendation c++ windows ipc zeromq