Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a scenerio where I am using external notification to process documents being sent in from the entire navy fleet, normally I have no problems, but just a few days ago an administrator changed passwords and I my queue processing failed and I rolled back the transaction with this C# code:

catch (Exception) { TransporterService.WriteEventToWindowsLog(AppName, "Rolling Back Transaction:", ERROR); broker.Tran.Rollback(); break; }

after which my target queue would continue to fill up but nothing to the external activation queue. Does the Event Notification get disabled once a transaction is rolled back? Should I have done a broker.EndDialog here when catching my exception?

Also, after my event notification is disabled(if that is actually whats happening) how do I re engage it? Do I have to drop it and recreate it? Thank in advance for any help, I love Service Broker and its workign wonderfully except for this bug that I hope to fix soon.

share|improve this question

1 Answer 1

Most likely your Service Broker queue was disabled due to poison message detection (as a result of your catch block executing 5 times in a row). After you fix the underlying problem (wrong password), you should only need to re-enable the queue:

ALTER QUEUE [name] WITH STATUS = ON;

I don't think there's anything that needs to be done to the event notification itself.

If you want to quickly detect such situations in the future, you can set up an event notification for QUEUE_DISABLED event, so that it notifies you when a queue gets disabled.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.