Menu ▾ ▴

#13 ACK leads to indefinite loop of sending messages

socketReader 1.x
unread
5
2015-12-21
2015-12-21
No

if you have multiple Out-Sockets which deliver the very same HL7 message, after the first successfull ACK the self.messageCtrlId is going to be set to None. This leads to the problem that the next ACK can not be handled anymore as it compares to None instead to the actual message ID. This leads to an indefinite loop of sending the very same HL7 message over and over again.

To fix this, comment line 1249 of workerThreads.py out (#self._ _messageCtrlId = None)

Related

Bugs: #13

Discussion

  • Sebastian Weigmann

    Hi Linus,

    thanks for your report!

    After a few years off, I was trying to figure things out.

    self.__messageCtrlId is private to every instance of the HL7Transmitter
    class. When creating new instances of it and adding them to the same
    message queue, each of the class instances should hold, along with a
    private queue of messages, its own state of which ACK have been seen.
    Not resetting self.__messageCtrlId after having seen the appropriate ACK
    might cause the adapter to falsely dismiss other messages sent but not
    ACKed yet - however, major havoc would be needed to create such a
    condition. Anyway, I believe that just not cleaning up when done may
    eventually cause problems later and is not a good strategy to employ in
    software products.

    So, I was trying to figure out what could have gone wrong initially. I
    came up with several guesses but I would need more information from you
    about your setup to confirm or dismiss them and then do a real fix.

    a) Did you set up several HL7Transmitters on the same queue, so they
    all get a copy of each message on their own? If so, did all
    transmitters have their own unique combination of IP:PORT
    (important)?

    b) Did you set up one HL7Transmitter as a socket server and then have
    multiple devices connect to it for receiving messages (unsupported,
    please use distinct adapters for each device to feed messages to)?

    Best regards,
    -- Sebastian

    --
    PGP-Key Fingerprint:
    A9DB 35EF D353 A79E 7CEA 3DC5 8474 8C67 84CF DA58

    On 21.12.2015 16:42, Linus Betschart wrote:


    ** [bugs:#13] ACK leads to indefinite loop of sending messages**

    Status: unread
    Group: socketReader 1.x
    Labels: bug socket ack workerThread
    Created: Mon Dec 21, 2015 03:42 PM UTC by Linus Betschart
    Last Updated: Mon Dec 21, 2015 03:42 PM UTC
    Owner: Sebastian Weigmann

    if you have multiple Out-Sockets which deliver the very same HL7 message, after the first successfull ACK the self.messageCtrlId is going to be set to None. This leads to the problem that the next ACK can not be handled anymore as it compares to None instead to the actual message ID. This leads to an indefinite loop of sending the very same HL7 message over and over again.

    To fix this, comment line 1249 of workerThreads.py out (#self._ _messageCtrlId = None)


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hl7socketreader/bugs/13/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #13


Log in to post a comment.