A socket of type ZMQ::Socket::Req is used by a client to send requests to and receive replies from a service. This socket type allows only an alternating sequence of ZMQ::Socket#send and subsequent ZMQ::Socket#recv calls. Each request sent is load-balanced among all services, and each reply received is matched with the last issued request.
When a ZMQ::Socket::Req socket enters an exceptional state due to having reached the high water mark for all services, or if there are no services at all, then any ZMQ::Socket#send operations on the socket shall block until the exceptional state ends or at least one service becomes available for sending; messages are not discarded.
Bidirectional
Send, Receive, Send, Receive, …
Load-balanced
Last peer
Block
Generated with the Darkfish Rdoc Generator 2.