Rhino ESB unable to recover from Message Queuing service restart

24 views
Skip to first unread message

René M. Andersen

unread,
Feb 9, 2012, 6:57:26 AM2/9/12
to rhino-t...@googlegroups.com
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
                    }
            ...

Corey Kaylor

unread,
Feb 9, 2012, 10:14:28 AM2/9/12
to rhino-t...@googlegroups.com
That seems reasonable to me.

--
You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rhino-tools-dev/-/RZyl0eiCKUAJ.
To post to this group, send email to rhino-t...@googlegroups.com.
To unsubscribe from this group, send email to rhino-tools-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en.

René M. Andersen

unread,
Feb 10, 2012, 6:58:00 AM2/10/12
to rhino-t...@googlegroups.com
Well it might be reasonable that it quits the thread. But no notifiation/event or other indication that this has happened is available as far as I can tell.
If the service bus will not automatically try and recover from this (which may be ok), then the client should have the possibility to either try and recover or report that this has happened, in my opinion.

Is there a way to detect that the worker threads stop working?

Corey Kaylor

unread,
Feb 10, 2012, 12:12:33 PM2/10/12
to rhino-t...@googlegroups.com
Sorry I meant to say that trying to recover for a period of time sounds reasonable. I was in a rush when I sent my reply, sorry for not being more clear.

--
You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rhino-tools-dev/-/BWoKN5_RKvkJ.

René M. Andersen

unread,
Feb 13, 2012, 2:54:01 PM2/13/12
to rhino-t...@googlegroups.com
Ok:) I will try if I can find a solution to this
Reply all
Reply to author
Forward
0 new messages