Symptoms
Consider the following scenario:
-
You enable Microsoft SQL Server Service Broker (SSB) in SQL Server AlwaysOn Group database.
-
You shut down and restart the database.
-
Make sure that the Acknowledge (ACK) is received successfully.
In this scenario, message is not removed from transmission queue even though the ACK is received successfully.
Cause
The issue occurs because, when you start the database after the clean shut down, SQL Server does not check whether the transmission queue deferred delete task is reusable. It assumes that the transmission queue deferred delete task is ok.
Resolution
The issue was first fixed in the following cumulative update of SQL Server.
Cumulative Update 1 for SQL Server 2014 /en-us/help/2931693
Cumulative Update 9 for SQL Server 2012 SP1 /en-us/help/2931078
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Workaround
To work around the issue, failover the SQL Server Availability Group to the secondary replica (and failback if it is required).
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.