Reply To: Multiple threads connection

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Multiple threads connection Reply To: Multiple threads connection

#56602
David Caragay
Participant

Try this code.  You can add any bells and whistles later if you wish.  This proc should be placed on your thread2 OB TPS.  You will also have to set up a route on thread2 to send data to thread3.  I put a few msgdumps in the code so you can see the metadata change in the log.  You can remove them before using this in production.

As I said before, this seems to be adding unneeded complexity to the interface.  Unless you have real performance issues, you may want to reconsider this configuration.  Adding another thread to simpify the interface would be my recommendation.  I usually save these unusual configurations for interfaces that really need it.

proc over_msg { args } {

   keylget args MODE mode               ;# Fetch mode

   set dispList {} ;# Nothing to return

   switch -exact — $mode {

       start {

           # Perform special init functions

   # N.B.: there may or may not be a MSGID key in args

       }

       run {

           # ‘run’ mode always has a MSGID; fetch and process it

           keylget args MSGID mh

           msgdump $mh

           msgmetaset $mh SOURCECONN thread2

           msgdump $mh

           lappend dispList “OVER $mh”

       }

       time {

           # Timer-based processing

   # N.B.: there may or may not be a MSGID key in args

       }        

       shutdown {

   # Doing some clean-up work

}

   }

   return $dispList

}

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,291
Replies
34,426
Topic Tags
286
Empty Topic Tags
10