batch processing a msg file and xmitting via tcpip

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf batch processing a msg file and xmitting via tcpip

  • Creator
    Topic
  • #53116
    Noel Field
    Participant

      i have a thread that will write messages to a file. Once a day, i want to be able to transmit the messages in the file out via tcpip. Not sure how to do this.

      any help would be greatly appreciated .

    Viewing 3 reply threads
    • Author
      Replies
      • #76614
        Jerry Tilsley
        Participant

          Use a Fileset-Local connection to pickup the file on a schedule, then transmit to outbound connection that is tcpip.

        • #76615
          Jim Kosloskey
          Participant

            Just be aware you could have issues if the file is being written to when you try to read it.

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

          • #76616
            Jerry Tilsley
            Participant

              Because of what Jim has mentioned, I generally do not use spool files anymore.  Normally I write everything to a SQLite database with an is_sent flag.  This way if something is being writting to it at the same time that things are being pulled there is no loss of data.  

              Otherwise you need to pause writing to the spool file until after adequate time has been allowed for retrieving it, this is where the scheduling features come in handy for the inbound thread, you will just have to write a tcl proc or something to pause the ob thread that writes to the spool file during that time.

            • #76617
              Russ Ross
              Participant

                To solve the probelm of writing to a spool file while reading from it we:

                – temporarily shutdown the writing thread.

                – move the spool file to a load directory that gets read by fileset-local read thread but isn’t used by the writing thread.

                – restart the writing thread to generate a new clean spool file for later on when the next batch needs to be sent.

                – start the fileset-local thread that has message throttlling set to the desired level of message consumption.

                – now the read and write threads are running simultaneously without stepping on each other.

                Russ Ross
                RussRoss318@gmail.com

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