我正在为我的项目之一使用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