[zeromq-dev] Problem routing packet back to client

Hsiao Henry henry at kikiplay.com.tw
Thu Dec 27 07:58:35 CET 2012


I am using ZeroMQ 3.2.2 with clrzmq 3.0.0 binding on C#.

Attempting to use ZeroMQ within Microsoft Azure environment with service
bus queue.

I have 3 pieces, RECEIVER, WORKER, RESPONDER

Below is what is working:

RECEIVER have following threads:
1)  ZMQ_PROXY, accept outside connection and route it to INPROC (to thread
2 below)

2)  receive worker
have a ROUTER socket connect to INPROC address and bind to thread-specific
INPROC address
Like following:
receive_worker.connect("inproc://workers");
receive_worker.bind("inproc://workers-1");
Idea is it will put all request from "inproc://workers" into Service Bus
Queue (WORK_QUEUE), and anything from "inproc://workers-1" is sent back to
the user.

3)  response worker
Retrieve data from Queue (RESPONSE_QUEUE), this thread will forward this
address to the correct thread via the address contained in the data.

WORKER:
This part right now just does echo, so it takes everything from WORK_QUEUE
and shove it directly into RESPONSE_QUEUE

Now what I actually want to accomplish is,
because there are multiple instance of RECEIVER, I thought I need a
separate RESPONDER instance.  Modification is that RECEIVER worker will
also attach its own IP to the message, so responder knows which instance of
RECEIVER to send the reply to.

Problem I am getting is... well... message just gets lost.

All this probably sounds very confusing, but if anyone could help by
perhaps asking the question I haven't thought of??  *.*

Problem with the design that does work is, well once I have multiple
instance of RECEIVER, then message don't always get routed back to the
instance of receiver the client is connected to.

Thanks in advance,

Henry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121227/4728c993/attachment.htm>


More information about the zeromq-dev mailing list