BROKER_RECEIVE_WAITFOR Wait Type in SQL Server

Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: SOS_SCHEDULER_YIELD Wait TypeRelated pillar: Performance & Troubleshooting

BROKER_RECEIVE_WAITFOR is recorded when a session has issued a WAITFOR (RECEIVE ...) against a Service Broker queue and is waiting for a message to arrive. Queue readers are designed to block until there is work, so on a quiet conversation this wait can legitimately run for hours.

If you use Service Broker (or features built on it, like event notifications or some queue-based application designs), this is the sound of readers standing by.

Is It a Problem?

No; an empty queue with a patient reader is the intended resting state, and this wait is filtered as benign. Its total mostly measures how quiet your queues are and how many readers wait on them.

The performance questions that matter for Service Broker are elsewhere: whether messages are flowing (transmission queues backing up), whether activation keeps up with arrival rates, and whether conversations are being closed properly (leaked conversations bloat things over time). None of those reads through this wait.

Common Causes

  • Queue reader procedures blocked on RECEIVE WAITFOR with no messages arriving.
  • Application designs with standing readers on rarely used queues.

What To Do

  1. Filter it out of wait analysis; our Get-WaitStatistics script does by default.
  2. For actual Broker health: check sys.transmission_queue for stuck messages, activation procedure errors in the error log, and conversation counts for leaks.
  3. Leave the readers blocking; polling instead of blocking would be strictly worse.

How To See It

Rank waits with Get-WaitStatistics, where it is filtered. Its presence documents that Service Broker readers exist, nothing more.


Where To Go Next

BROKER_RECEIVE_WAITFOR is background noise on a healthy instance. If you are chasing a real problem, start with the waits that actually cost you time.

Related waits: BROKER_TASK_STOP · BROKER_TO_FLUSH · BROKER_TRANSMISSION_TABLE

Comments

Leave a Reply

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