April 21, 2010 at 7:19 am
hi,
we are using broker service like we simple queuing message for the enter data and from application side they receive and show, it's working fine before but suddenly when it's giving error and when i checked that
i found that broker service disabled how it can happen that broker service disabled automatically
to check that i have fire this query
SELECT is_broker_enabled, * from sys.databases where name = db_name() i got 0 and i got idea that broker service disabled and message not getting queued
when i look further into sys.transmission_queue
in transmission_status i found this error :- "The broker is disabled in the sender's database."
anyone any idea ?
how it can happen and what solution for that to prevent this type of problem
Thanks in advance
Raj Acharya
June 1, 2010 at 4:32 pm
The Service Broker Queue (or was it the service, I don't remember, but it has happened to me too) will be disabled if it receives poison messages.
When a transaction that contains a RECEIVE statement rolls back five times, the Queue will be disabled. This is to prevent it from going into a loop trying to receive the same message over and over again. The messages that is received in the transaction the rolls back is called poison messages.
There is nothing dangerous in the message itself, as the name "poison message" might suggest. The problem is usually caused by "poor" logic in the TSQL statements that processes the message body. Perhaps there is an INSERT statement that tries to insert an illegal value into a column, or some other kind of constraint violation. If you are using an activation procedure on the queue that is being disabled I suggest you disable the activation procedure, re-enable the queue, and then execute the procedure manually. Any exceptions will be printed in SSMS and should help you track down what is causing your problem.
Remember that a rollback on a RECEIVE statement will potentially disable the queue. You should therefore have error handling in the RECEIVE code that will log detail about the error if the transaction rolls back.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply