I skip the part where I say how much I love ZMQ and how great/easier it makes my dev….I guess this is implied in this thread trying to implement it in yet another project…
So, I would like to listen on 3 TCP sockets A, B & C: actually 2 clients (A=25500 & B=27500) and a server (C=25000)
Each A, B or C socket should/will receive string CSV packet, where the third parameter is the destination.
Based on this destination, packet will be redirected/forwarded/enqueued to the appropriated socket for sending.
No ack, no validation, no query-expected-response…
If connexion drop on one of the socket, packets for this one are just dropped.
So there is little check for the queue selection, and simply 3 sockets.
- what is the best implementation? not sure I am aiming at a PUB/SUB here (or a double one for each socket?), no REQ/REP, nor BROKER…
Actually this _could_ look like the famous weather example, however, not only subscribing in one direction, as each inbound is able to send/receive those string packets.. I guess I don't want FORWARD (although very tempting) since it won't le me do my packet/csv inspection at code level…or will it?
This sound so…easy, yet I could not manage to come with a great (thus simple) design…
- a fourth (or N-th) socket could be added in the futur, design should remain flexible.
- this would be initialy Linux/Python, but I don't have any issue with other language (although I am confident this is not really plateform/language dependent, right?)
Could you come with