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.
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.
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?
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?
There's nothing to prevent you augmenting any of the classes in the code base to better suit your requirements.