Uploaded image for project: 'libzmq'
  1. libzmq
  2. LIBZMQ-268

Loosing first multi-part message when using PGM

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0, 3.1.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      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 ODATA packet sent by the first PGM message from the
      publisher host.

      The problem is the same if I use epgm instead of pgm.
      The same code works fine if all messages are transported using TCP.

      The problem disappears if I use simple message instead of multipart message

        Gliffy Diagrams

          Attachments

          1. libzmq-268
            2 kB
          2. pub.cpp
            2 kB
          3. sub.cpp
            1 kB

            Activity

            taurel Emmanuel Taurel created issue -
            mato Martin Lucina made changes -
            Field Original Value New Value
            Assignee Martin Sustrik [ sustrik ] Martin Lucina [ mato ]
            mato Martin Lucina made changes -
            Affects Version/s 3.1.0 [ 10121 ]
            taurel Emmanuel Taurel made changes -
            Attachment pub.cpp [ 10600 ]
            taurel Emmanuel Taurel made changes -
            Attachment sub.cpp [ 10601 ]
            pieterh Pieter Hintjens made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            hurtonm Martin Hurton made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            taurel Emmanuel Taurel made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Reopened [ 4 ]
            taurel Emmanuel Taurel made changes -
            Comment [ I am afraid I have to re-open this bug. I am now using ZMQ 3.2.1 rc2 and when using PGM, the first message (multi-part message) is not received by the subscriber. I see the message on the wire transported by PGM but the
            subscriber stays waiting in the recv call.

            Good luck ]
            taurel Emmanuel Taurel made changes -
            Attachment libzmq-268 [ 13000 ]

              People

              • Assignee:
                mato Martin Lucina
                Reporter:
                taurel Emmanuel Taurel
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: