"message0" is destroy locked

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf "message0" is destroy locked

  • Creator
    Topic
  • #49691
    Rentian Huang
    Participant

      Greetings Cloverleafers!!

      I have an IB pre-TPS that gives me an error saying “message0” is destroy locked while executing “msgdestroy $mh”. I need to destroy that incoming msg because I don’t need it and if I don’t destroy it, it kinda reminds in the Recovery DB forever.

      Any help is very much appreciated!!

      Sam  8)

      proc tpsFilterHL7BhsBts { args } {

         keylget args MODE mode              ;# What mode are we in
         set msgList {}                      ;# The return list containing multiply msgs

         switch -exact — $mode {
             start {
                 return “” ;# Perform special init functions
             }

             run {
                  keylget args MSGID mh
                 set oriMsgs [msgget $mh]
                         msgdestroy $mh
                         ………….
      [code]proc tpsFilterHL7BhsBts { args } {

         keylget args MODE mode              ;# What mode are we in
         set msgList {}                      ;# The return list containing multiply msgs

         switch -exact — $mode {
             start {
                 return “” ;# Perform special init functions
             }

             run {
                  keylget args MSGID mh
                 set oriMsgs [msgget $mh]
                         msgdestroy $mh
                         ………….

    Viewing 3 reply threads
    • Author
      Replies
      • #63113
        Greg Eriksen
        Participant

          Hi Sam,

          I don’t know if this will be any help to you, but since no one else has replied yet…

          Our “filtering” procs are usually implemented as a pre-proc in the Xlate Route Details, rather than in the TPS Inbound Data upoc, where we usually just have a proc to send back the ACK.

          And in our filter procs, we don’t use the msgdestroy command, but instead just return a disposition of KILL (instead of CONTINUE) for the messages we don’t need.  And this removes them from the Recovery db.

          example:

          lappend dispList “$disp $mh”

          return $dispList

          If this isn’t a good approach for what you are trying to do, maybe you could explain more about why you are trying to destroy the message in the inbound tps rather than KILL it in the routing details.

        • #63114
          Rentian Huang
          Participant

            Greg,

            I just tried the KILL and it works like a charm. I do think that’s a better way to handle the issue. But also wonder how come msgdestroy wouldn’t work.

            Thanks for your kind help!!!

            Sam  ðŸ˜›

          • #63115
            Charlie Bursell
            Participant

              It’s locked to protect you from yourself  ðŸ™‚

              The difference bewteen KILL ans msgdestroy is that in addition to destroying the message, KILL also removes it from the database.  If you had been successful with your msgdestroy command you would have made one heck of a mess with your database.

              Any messages you create in the proc are not locked but the engine messages are specifically for the above reason.

            • #63116
              Rentian Huang
              Participant

                Thank you for your clear explaination, Charile, as before!

                Sam  8)

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.