Implementation of Router / Dealer / Poller pattern with NetMQ

1,155 views
Skip to first unread message

Chris Perks

unread,
Dec 19, 2013, 8:22:40 AM12/19/13
to netm...@googlegroups.com
Hi,

I'm having a few problems implementing the standard Router / Dealer / Poller topology, and would appreciate some help.

Context:

I'm using 'the guide' as an example of three running services:

Worker : http://zguide.zeromq.org/cs:rrworker
Client : http://zguide.zeromq.org/cs:rrclient
Broker : http://zguide.zeromq.org/cs:rrbroker

  • Broker binds a Router socket on :5559 and a Dealer socket on :5560
  • Worker connects a Response socket to :5560
  • Client connects a Request socket to :5559

My exact code is here : http://pastebin.com/n8HpF69U

Problem:

My backend Worker never recieves any messages. It hangs at the ReceiveString() step forever. Would somebody with more experience than me be able to please check and see if I'm using the correct combination of sockets here? I have a feeling I may be porting the cmrzmq code too literally and need to adjust it for NetMQ use.


Thanks,

Chris.

Doron Somech

unread,
Dec 19, 2013, 8:28:26 AM12/19/13
to Chris Perks, netm...@googlegroups.com

There is a known issue with localhost try to use 127.0.0.1 instead

--
You received this message because you are subscribed to the Google Groups "netmq-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netmq-dev+...@googlegroups.com.
To post to this group, send email to netm...@googlegroups.com.
Visit this group at http://groups.google.com/group/netmq-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Chris Perks

unread,
Dec 23, 2013, 5:41:28 PM12/23/13
to netm...@googlegroups.com, Chris Perks
Thanks, Doron.

I changed localhost to be 127.0.0.1 and also changed my ReceiveMessage calls to be ReceiveString, and I'm now getting the correct results.

Keep up the good work!
Reply all
Reply to author
Forward
0 new messages