BROKER_INIT and Service Broker Startup Wait Types in SQL Server

Service Broker has a cluster of internal waits around its startup, shutdown, and endpoint machinery that share one story, so this page covers them together:

  • BROKER_INIT: waiting one second between attempts to initialise Service Broker for a database. Occurs at database startup; infrequent by design.
  • BROKER_MASTERSTART: waiting during the startup of Service Broker’s master task for the instance.
  • BROKER_REGISTERALLENDPOINTS: waiting during the registration of Broker endpoints at startup.
  • BROKER_ENDPOINT_STATE_MUTEX: waiting for access to a Broker endpoint’s state while it changes (started, stopped, disabled).
  • BROKER_SERVICE: waiting for access to a target service’s next-hop destination list while it is updated or re-prioritised as dialogs come and go.
  • BROKER_SHUTDOWN: waiting during an orderly Service Broker shutdown, typically when a database is detached or the instance stops.
  • BROKER_CONNECTION_RECEIVE_TASK: waiting for access to a Broker connection’s receive machinery while messages arrive on an endpoint.

Are They a Problem?

No. Every one of these is lifecycle or configuration machinery, active at startup, shutdown, endpoint state changes, and routing updates, and none has been a contention point in practice. Their totals stay small because the events they cover are inherently infrequent.

They are documented here mainly so a lookup lands somewhere useful: if one of these names appears in your wait output, Service Broker started, stopped, or reconfigured something, and that is the whole story.

What To Do

  1. Filter them out of wait analysis; they are event markers, not performance signals.
  2. For real Service Broker troubleshooting, the productive places remain sys.transmission_queue (delivery), the error log (activation and endpoint errors), and sys.conversation_endpoints (conversation hygiene).
  3. If an endpoint state change hangs (rare), the cluster of these waits plus a stuck ALTER ENDPOINT identifies it; look at what holds the endpoint busy.

How To See It

Rank waits with Get-WaitStatistics; expect these names only as traces around Broker lifecycle events.


Part of the SQL Server Wait Types Library.
Related deep dive: SOS_SCHEDULER_YIELD Wait Type.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *