TCL needed to route/forward dynamically message to thread

Clovertech Forums Read Only Archives Cloverleaf Tcl Library TCL needed to route/forward dynamically message to thread

  • Creator
    Topic
  • #54247
    Vishal Patole
    Participant

      We are attempting to write TCL to route/forward dynamically message to thread across site.

      Requirements:

      – Send message from “Thread A” in “Site A” to “Thread B” in “Site B”

      – Acknowledge message send to “Thread B”

      – Do not want to use tcpip or pdl-tcpip PROTOCOL for “Thread B” in thread configuration

      Not sure if this is possible, experts comments are appreciated.

    Viewing 1 reply thread
    • Author
      Replies
      • #80715
        Jim Kosloskey
        Participant

          If you are Cloverleaf 5.8 or later use cross site routing or the tcp/ip or pdl protocols.

          What is your reason for not wanting to use those protocols?

          We do a lot of that and it works.

          Cross site routing does not natively allow the receiving thread to be treated as an inbound thread and thus allow further routing.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #80716
          Vishal Patole
          Participant

            We are using 5.8.6 and migrating shortly to latest 6.0.2 version.

            Cloverleaf native protocols works fine and we are also using it widely in our different types of implementations.

            Reason I have submitted these questions because we have a need where dynamic message routing will happen where; message will be received by thread which is configured for WSA 1.0(JAVA protocol) and we needs to route that message to thread which is in different site.

            Routing has to be dynamic as we do not prefer thread for inter site routing in a site which hosts WSA thread as well. (This is to reduce number of hosted threads per site).

            TCL >> To route message dynamically

            set msg [msgget $mh]

            set newmeta “ORIGSOURCECONN $::HciConnName SOURCECONN $thread TYPE data CLASS engine”

            set newmh [msgcreate -recover -meta $newmeta]

            msgset $newmh $msg

            lappend dispList “KILL $mh” “CONTINUE $newmh”

            This works as long as destination thread is in same site.

        Viewing 1 reply thread
        • The forum ‘Tcl Library’ is closed to new topics and replies.