[zeromq-dev] Problem with DEALER - ROUTER (assertions in mailbox.cpp:79)
Niels Berglund
niels.it.berglund at gmail.com
Mon Apr 8 16:13:22 CEST 2013
Hi Chuck,
Yes - I did read through ch 4 (perhaps not as well as I should have, but
...). I especially looked at the MajorDomo asynch pattern. The problem I
have with that is that, I cannot see how the client would receive an
"unsolicited" message, after having done an initial connection. I.e. the
traditional listener...
Niels
On 8 April 2013 15:53, Charles Remes <lists at chuckremes.com> wrote:
> Niels,
>
> Before we go any further, can you tell us if you have read the guide yet?
> Chapter 4 would very likely answer your questions so I'm curious to know if
> you went through that chapter (and its examples) but you still have a
> problem or question to resolve. Please advise.
>
> cr
>
> On Apr 7, 2013, at 1:09 PM, Niels Berglund <niels.it.berglund at gmail.com>
> wrote:
>
> > Hi all!
> > So I am playing around with ZeroMq i order to get to grips how to create
> applications using it. I am running on Windows using the ClrZmq binding,
> and I am getting assert exceptions as per the title of this mail. When
> reading about this assert, it seems that it is related to threading issues,
> but I can't for the life of me see how I can handle the code in any other
> way than what I am doing.
> >
> > Anyway, the test consists of two applications a client (DEALER socket)
> and a service (ROUTER socket). The client sends in a very tight loop a
> number of messages - this is configured in a config file. The service (the
> ROUTER) receives the messages and sends a reply back. On the client I
> receive the message and increments a counter of how many messages I have
> received.
> >
> > The problem is that up to a certain number of messages (let's say the
> configured value is 50,000) everything works fine, then when I set the
> number to be higher (60,000 for example) I get this assert error. The thing
> is however that I do not receive it after the 50,000 - but I can receive it
> anywhere in the process (i.e. 5,000 , 10,000 etc). That baffles me a bit.
> The HighWatermark for both send and receive is set to a very large number,
> much higher than the configured value.
> >
> > My assumption is that this assert has something to do with threading,
> but I cannot see how to architect the app and running everything from one
> thread. At the moment I have a TestSocket class, where I create the socket,
> have the receive and send logic etc. A receive will fire an event exposing
> the message received. A TestClass creates the TestSocket class, subscribes
> to the receive event and also initiates the send of messages.
> >
> > I have read how the created socket always have to be accessed by the
> thread that created it, but I can't see how I can do that and have a poller
> which polls for messages. So in my TestSocket class I create the poller and
> then starts to poll on a separate thread.
> >
> > Does anyone have any insights in this?!!
> >
> > Thanks!
> >
> > Niels
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130408/3c935e5a/attachment.htm>
More information about the zeromq-dev
mailing list