我正在爲我的項目之一使用NServiceBUs的請求答覆模型。有一個自己託管的服務總線監聽請求消息並回復請求消息。 所以在WCF消息的代碼,我編碼方式類似於Nservicebus同步呼叫
// sent the message to bus.
var synchronousMessageSent =
this._bus.Send(destinationQueueName, requestMessage)
.Register(
(AsyncCallback)delegate(IAsyncResult ar)
{
// process the response from the message.
NServiceBus.CompletionResult completionResult = ar.AsyncState as NServiceBus.CompletionResult;
if (completionResult != null)
{
// set the response messages.
response = completionResult.Messages;
}
},
null);
// block the current thread.
synchronousMessageSent.AsyncWaitHandle.WaitOne(1000);
return response;
的destinaton闕將發送的答覆。 我得到的答覆不是來自客戶端的resault one或tweo times afetr。我做錯了什麼
想一想:http://stackoverflow.com/questions/3758405/nservice-bus-message-delay-problem – mynkow 2010-10-18 18:31:14