[zeromq-dev] ROUTER-DEALER missing connects/messages.
Michel Pelletier
pelletier.michel at gmail.com
Tue Sep 25 16:35:32 CEST 2012
It looks like you are sending a multi-part message but not receiving
it correctly. I'm not java expert so perhaps I could be wrong about
how to recv a multi-part message in java, but in C you need to loop on
recv() and check the socket option ZMQ_RCVMORE to know when to break.
-Michel
On Tue, Sep 25, 2012 at 6:51 AM, Dowd, Brian <Brian.Dowd at commerzbank.com> wrote:
> Hi all,
>
> I am trying to get a simple example ROUTER/DEALER working, but seem to be
> hitting a problem
>
> that I've seen referred to in a few places - basically that of los/missing
> messages.
>
>
>
> I need my clients (DEALERs) and server (ROUTER) to be able to stop & start
> independently .. they will be
>
> in separate processes.
>
>
>
> My ROUTER will be the server and there will be multiple DEALER-clients
> however I cannot do the Thread.sleep()
>
> that appears in the rtdealer example in my real production code.
>
>
>
> I've seen some traffic about it and tried some suggestions in my code -
>
> 1. Thread.sleep() - from original rtdealer, works but not deterministically
> and cannot use in PROD.
>
> 2. Send a message through on each side to complete the connection, does not
> fully work.
>
>
>
> I've also seen some issues about it in the newsgroups, and am wondering if
> this is an issue with the
>
> later versions of zero mq… I don't know.
>
>
>
> http://article.gmane.org/gmane.network.zeromq.devel/13004
>
> http://thread.gmane.org/gmane.network.zeromq.devel/12967/focus=12982
>
> http://thread.gmane.org/gmane.network.zeromq.devel/11571
>
> http://article.gmane.org/gmane.network.zeromq.devel/12981/match=router+dealer
>
>
>
> I also could not see a JIRA issue reported against exactly this behaviour,
> so perhaps I am doing something silly ….
>
>
>
> I am using java version 1.6.0-21 and ZMQ version version 3.2.0-rc1 as
> recommended for new projects.
>
> The OS is Windows x86 architecture.
>
>
>
> I have also run (not the example) a more comprehensive version on linux
> boxes, and they seem to work
>
> sometimes and not others (timing related) I believe it is the same problem
> that the example code illustrates,
>
> this is on i386/Linux.
>
>
>
> Here is a paste bin of my example code - http://pastebin.com/s1gJpcP9
>
>
>
> Any help very much appreciated.
>
>
>
> Cheers,
>
> Brian.
>
>
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list