Very fine article.
Yet running the code, I never get entries in ExecutionLog, never receive @ReceivedReplyMessageType = N'//HardwareStore/ReplyMessage'.
Also, in File 070 StaffManager.sql (SP StaffManager)
-- Instruct worker to execute the request.
EXEC Worker @ReceivedRequestMessage, @ReplyMessage OUTPUT
then immediately overwrite the output variable:
SET @ReplyMessage = (SELECT @ReceivedRequestMessage, @ReplyMessage FOR XML PATH('ExecutionComplete'));
How can this be correct, since SP Worker carefully loads that output variable with:
-- Convert the result recordset to xml and pass it back to the caller (OUTPUT var).
SET @ReturnMessage = (SELECT ItemVolume FROM @InventoryCount FOR XML PATH('WorkerReport'))
And thanks. We need Async operations, and want to use SB.