[zeromq-dev] Configuration help requested

Larry White ljw1001 at gmail.com
Fri Mar 6 17:47:19 CET 2015


I'm trying to implement "chain replication" using 0MQ, and need help
configuring the system.

In chain replication, you have n clients and a sequence of server replicas.
The replicas are updated in order from HEAD to TAIL.  A three link chain
works in a loop like this:

1. CLIENT sends write request to HEAD
2. HEAD processes request and forwards to MIDDLE (No reply to client)
3. MIDDLE processes request and forwards to TAIL
4. TAIL processes request and sends a reply back to CLIENT.

I would like the interaction between CLIENT and the chain to be synchronous
(blocking), so that the client waits until it receives the reply from TAIL.

I tried to set this up with head having a REP socket for client and a PUSH
socket for the chain. This causes an exception (obvious in hindsight) that

java.lang.IllegalStateException: Cannot receive another request

What is the correct way to do structure the relationship between Client and

Thank you very much for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150306/1faa3344/attachment.htm>

More information about the zeromq-dev mailing list