[zeromq-dev] Loosing first message with PGM
Emmanuel TAUREL
taurel at esrf.fr
Thu Oct 6 14:08:50 CEST 2011
Martin,
On 06/10/2011 12:00, Martin Sustrik wrote:
> Emmanuel,
>
> Does this problem persist?
Yes, even with the latest 3.x branch (compiled today)
>
> If so, please create an issue in the bug tracker for it so that it's
> not forgot.
Done. It's libzmq-268
Emmanuel
>
> Thanks.
> Martin
>
> On 09/29/2011 10:26 AM, Emmanuel TAUREL wrote:
>> Hello all,
>>
>> I am using zmq 3.0.x. on Linux boxes (Ubuntu).
>> I am using pub/sub pattern.
>> In my application, on the publisher side, I have a publisher socket
>> using TCP transport and another publisher socket using PGM transport.
>> I am able to manually trigger the PGM publisher to publish 1 multipart
>> message.
>> There are messages published at regular interval in the TCP publisher
>> (every 9 seconds).
>>
>> I start the subscriber process which is doing nothing else then waiting
>> for ZMQ messages.
>> To do so, it has a thread listening for ZMQ sockets using the zmq::poll
>> call. IT has 2 sockets (one sub for TCP and another one for PGM)
>> The subscriber process receives without any problem the TCP messages.
>> Nevertheless, the first message sent by the PGM publisher is lost
>> because the zmq::poll() call does not return for this first PGM message!
>>
>> I had a look at network packets using wireshark on the subscriber side.
>> I see the PGM SPM packet sent every 30 seconds.
>> Then I see the ODATA packet sent by the first PGM message from the
>> publisher host.
>> This packet is followed by several SPM packets but it does not make my
>> thread to return from the zmq::poll() call!
>> I do not notice something different on the network packets when I
>> compare the first PGM message exchange with the following one (which
>> makes my
>> code to return from the zmq::poll)
>>
>> The problem is the same if I use epgm instead of pgm.
>> The same code works fine if all messages are transported using TCP.
>>
>> Do you have any idea how I could solve this problem?
>> Is it due to a bad usage of zmq::poll() call?
>>
>> Thank's for your answer
>>
>> Emmanuel Taurel
>>
>>
>> _______________________________________________
>> 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