5 Replies Latest reply on Nov 25, 2007 12:02 PM by marklittle

    Stop Listener after Exception

    lfhaddix

      When we get a certain kind of exception -- for example the network is down -- we want the SQLListener to stop processing the records that are in the queue. Otherwise, if there are 100 queue records, we will just get the exception 100 times.


      Can you tell me how to tell the pipeline that I want it to stop processing -- not just this record but all records?

        • 1. Re: Stop Listener after Exception
          marklittle

          Just to be clear, when you say "stop processing the records that are in the queue" you mean stop pulling Messages from the db table where they were inserted? Or do you mean stop processing in the pipeline?

          I assume the former, but I want to be certain.

          • 2. Re: Stop Listener after Exception
            lfhaddix

            The listener is pulling all of the records in the db table at once, so they are already in the queue.

            I want the listener to shut down completely until it is restarted.

            • 3. Re: Stop Listener after Exception
              marklittle

              I know that Kevin added the lifecycle management capabilities to the various listeners a long time back, but I'm fairly sure these aren't meant to be called directly. Last time I checked there wasn't any other way to automatically get the listener to shutdown.

              What specific classes are you using and I'll take another look ? For example, since there is no class SQLListener in the codebase I assume you mean SqlTableGatewayListener?

              • 4. Re: Stop Listener after Exception
                lfhaddix

                We are using the default one which I assume is the SqlTableGatewayListener.

                If this functionally does not exist, can we extend that class and add the functionality that we want?

                • 5. Re: Stop Listener after Exception
                  marklittle

                  There's nothing to prevent you augmenting any of the classes in the code base to better suit your requirements.