I experienced a problem where the message queuing service was restarted whilemy service bus was busy processing messages.
That caused the MessageQueue.Peek() method to throw an exception. This exception is handled in the service bus by stopping/exiting the worker thread. Is this desired behaviour or should the service bus try to recover for some period of time before exiting? Below is a snippet of the Rhino ESB peek logic.
protected void PeekMessageOnBackgroundThread(object state)
{
using(var queue = Endpoint.InitalizeQueue())
while (shouldStop == false)
{
try
{
Message message;
bool? peek = TryPeek(queue,out message);
if (peek == false || shouldStop)//error reading from queue
{
TransportState = TransportState.FailedToReadFromQueue;
return; // return from method, we have failed
}
...