It stops all worker threads so they wont process any new messages, but it wont kill the currently executing background thread. But Starting the MQ Server again will kill any currently executing background thread, before starting a new one.
Are you saying if there are two or more different services executing in background threads only the one that is currently executing will run to completion and the others will be killed? (with async that could be lots killed). Or do you mean one per service can be ‘current’ in your definition?
No I’m saying each worker processing messages will stop processing new messages after calling Stop(), they wont kill the single background that executes the message in each worker, but if Start() was called before the background thread finished executing, it will be killed before start a new background thread for the worker.
Calling Stop() sets the status to WorkerStatus.Stopping which tells the background thread not to process any more messages. Once the status of the MessageHandler is WorkerStatus.Stopped it means the message worker’s background thread finished.
Calling GetStatus() or GetStats() on each Worker Handler will return the status but the message workers are hard to get to. If you cast to RedisMqServer you can get a text description of the Message worker status with WorkerThreadStatus() which you could check to see if they all contain the string “Stopped”.