how to flush out IB thread? (i.e. stop queued messages)

Homepage Clovertech Forums Cloverleaf how to flush out IB thread? (i.e. stop queued messages)

  • Creator
    Topic
  • #119777
    Jason
    Participant

    So I have an inbound thread that reads in a DAT file of HL7 messages. It’s in the middle of processing these files when I stop the thread, when I restart the thread, it continues processing where it left off. Is there a way to flush the ‘memory’ of this thread so that it does NOT keep processing what it was before I stopped it?

    thanks!

Viewing 4 reply threads
  • Author
    Replies
    • #119778
      Charlie Bursell
      Participant

      You could turn off  recover DB for that thread.  Bear in mind it will affect other threads in the route.  Recovery of a message is determined at the IB thread.

       

      Also make sure the dat file is backed up in case it was deleted

      • #119779
        Jason
        Participant

        yeah I don’t want to affect other threads in the route… so all the queued messages should be in the recovery DB?

        The way that process is, there’s two IBs feeding one OB. I just want to flush out this one IB without affecting the other one

        edit: I can’t find the messages in the recovery DB… my recovery DB is empty

        • This reply was modified 2 years, 3 months ago by Jason.
    • #119781
      Charlie Bursell
      Participant

      It would not affect messages from the other IB source.   But messages from the IB source with no recover DB would not be recoverable even in the OB thread.

      The only other real option I see is to manually delete any IB messages for that thread from the recovery DB before you restart.  I have tried to do things like this with a script but it is full of pot holes.

      Good luck with it.

    • #119782
      Keith McLeod
      Participant

      If you are using fileset or similar protocol, check you process directory for a file named fileset-<Your Thread name> or <Your Thread name>-FTP-temp.  I believe this keeps track of your read of the file and causes it to pick up where you left off.  When you thread is down, I believe you can delete these.  They will be recreated when you turn the thread back on…

       

      Happy Motoring!!!

      • #119783
        Jason
        Participant

        I see the fileset-<Your Thread name> file in the process directory.

        It’s safe to delete this file??

         

    • #119784
      Charlie Bursell
      Participant

      This file keeps track of which record in the file was being processed.  Deleting this file will cause the engine to start over again processing the file when restarted.  Is this what you wanted?  I assumed you wanted to flush the IB queue.  I was also under the impression you were reading in the whole file.  Bear in mind, if you delete this file, it will reprocess the file when restarted but any messages that were in state 2 or 3 will still be in the queue.

      We use this a lot when testing so we don’t have to keep using a new file with each run.

      • #119785
        Jason
        Participant

        Charlie,

        oh I see, no I don’t want it to start again, I want it just forget the file.. like stop processing that file period. I’m assuming in order to do this, I’d need to delete that fileset<thread> file and the source file it is reading from??

        edit, I suppose another question would be, should I just delete the source file? I have limited visibility into the file structure of where this Cloverleaf server sits so I assume the source file is just sitting there? and then, normally, gets deleted when when the file is finished processing?

        • This reply was modified 2 years, 3 months ago by Jason.
    • #119787
      Charlie Bursell
      Participant

      Yes delete both.  If you delete the source file and not the  fileset<thread> file you will get an error when you restart.

      Bear in mind that any messages in the recover DB will still be processed.

      • #119788
        Jason
        Participant

        perfect, thank you, I will give it a shot!

      • #119789
        Jason
        Participant

        Charlie,

        That worked! thanks! learned something new too

Viewing 4 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10