No, you should not use PUSH and ROUTER together. Your use-case mentions that 
*some* clients need to send a reply. A PUSH socket is send-only so you would 
never be able to receive those replies.

I recommend that you use DEALER and ROUTER sockets for your use-case. See this 
article for some important details.

http://www.zeromq.org/tutorials:dealer-and-router

There is no requirement that a ROUTER socket must reply to a DEALER socket. You 
could have 95% of communications be unidirectional and the 5% that require 
replies would be bidirectional. 

Perhaps you would like to explain your requirements in more detail and we can 
provide more guidance on socket and pattern choice.

cr

On Nov 13, 2012, at 10:22 AM, Ilja Golshtein <[email protected]> wrote:

> Hello, List!
> 
> Is it eligible to pair PUSH and ROUTER sockets?
> 
> I have clients send requests require answers and 
> clients who send some data to server and do not expect a response.
> It seems technically possible to have either PUSH or REQ at client side 
> and serve both types of input by ROUTER socket.
> 
> When ROUTER receives data, it looks like 
> routing parts, then empty part, then application data in case of REQ and 
> routing parts (which is useless) just before application data in case of PUSH.
> Assuming the first application part is not empty, everything seems Ok.
> 
> Advantages
> 1. No poll at server side.
> 2. One TCP port to open and to keep in mind.
> 
> Caveats?
> 
> zeromq 2.2, linux.
> 
> -- 
> Best regards
> Ilja Golshtein
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to