Symptoms
Assume that you have a SQL Service Broker (SSB) application deployed as part of Always On availability groups (AGs) in Microsoft SQL Server, and then you use AG listener to connect. After an AG failover, the SSB outgoing connections on the original primary replica are left open. This causes SSB incoming messages to be dropped because the databases are read-only or inaccessible.
Therefore, it manifests that SSB messages are stuck in the transmission queue, and more than one Service Broker connections exist in the AG.
Resolution
Cumulative Update Information for SQL Server:
This issue is fixed in the following cumulative updates for SQL Server:
Cumulative Update 6 for SQL Server 2016 RTM
Cumulative Update 3 for SQL Server 2016 SP1
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:
Note With this fix, SQL Server will close both incoming and outgoing SSB connections to the old primary Availability Group replica during failover, so that the messages which were getting dropped prior to this fix, will remain in the queue and they will get redirected to the new primary replica as soon as connections are established with the new primary replica, leaving no dropped or missing messages.
Service Pack Information for SQL Server:
This issue is fixed in the following service packs for SQL Server:
Service Pack 4 for SQL Server 2012
Service Pack 2 for SQL Server 2016
For more information about how to obtain the latest service pack, see How to obtain the latest service pack for SQL Server 2012
About Service packs for SQL Server
Service packs are cumulative. Each new service pack contains all the fixes that are in previous service packs, together with any new fixes. Our recommendation is to apply the latest service pack and the latest cumulative update for that service pack. You do not have to install a previous service pack before you install the latest service pack. Use Table 1 in the following article for finding more information about the latest service pack and latest cumulative update.
How to determine the version, edition and update level of SQL Server and its components
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminologythat Microsoft uses to describe software updates.