[zeromq-dev] Multithreaded server, delivers message in one direction
tlrx
tlrx.dev at gmail.com
Fri Oct 21 13:46:31 CEST 2011
Hi all,
I am trying to implement in Java a multithreaded server (
http://zguide.zeromq.org/page:all#header-39 in the guide).
In my case:
- many external clients connects (REQ) to my router (XREP, binded on
tcp://*:9700)
- clients send a simple message "Hello from client id"
- the router is connected to a dealer (XREQ, binded on inproc://workers)
through a Queue
- the Queue connectes router and dealer together
- many workers (REP, all binded on inproc://workers) are supposed to
received messages from the dealer and respond to it
Router, Dealer and Queue are created with the same Context in a single
thread.
There is 1 Thread per worker, and the worker's socket is created with the
same context as router/dealer/queue.
The workers correctly received messages from the Dealer. The message "Hello
from client id" has an envelope. As soon as all the message is received, the
worker construct a response ("Hi client id") and send it back. But the
response is never received by the initial Client. It looks like the Queue
correctly transfers the message received by router to the dealer and then a
worker, but only in one direction.
My code is directly inspired by http://zguide.zeromq.org/scala:mtserver.
Do you have any idea?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111021/b688dfde/attachment.htm>
More information about the zeromq-dev
mailing list