Why do I need two SQL Server Service Broker queues for a simple task?

前端 未结 2 1885
栀梦
栀梦 2021-01-01 07:34

All examples I find on the web for using SQL Server Service Broker queues seem to have two queues. I don\'t understand why and every example seems to assume that this is so

2条回答
  •  时光取名叫无心
    2021-01-01 08:12

    Service Broker has basically nothing to do with queues. Service Broker is for writing distributed applications, not for queuing. Queues are simply message stores for service, and one service is on one machine while the other service is on a second machine. Examples may show both services in the same database just for simplicity sake, but the example is still about communicating in a distributed environment.

    Examples that show case where a single queue apparently is enough are using Service Broker incorrectly. Those examples should better show how to use tables as queues.

提交回复
热议问题