配置为MSMQ的NServiceBus 6.4.3在启动时失败

配置为MSMQ的NServiceBus 6.4.3在启动时失败,nservicebus,msmq,Nservicebus,Msmq,我正在试验使用NServiceBus和MSMQ作为传输。一个非常简单的例子: static void Main(string[] args) { var endpointConfiguration = new EndpointConfiguration("myappqueue"); endpointConfiguration.UseTransport<MsmqTransport>(); var endpointInstance = Endpoint.Star

我正在试验使用NServiceBus和MSMQ作为传输。一个非常简单的例子:

static void Main(string[] args)
{
    var endpointConfiguration = new EndpointConfiguration("myappqueue");
    endpointConfiguration.UseTransport<MsmqTransport>();

    var endpointInstance = Endpoint.Start(endpointConfiguration).Result;
    Console.ReadKey();
    endpointInstance.Stop();
}
static void Main(字符串[]args)
{
var endpointConfiguration=newendpointconfiguration(“myappqueue”);
endpointConfiguration.UseTransport();
var endpointInstance=Endpoint.Start(endpointConfiguration.Result);
Console.ReadKey();
endpointInstance.Stop();
}
我在中添加了Windows功能消息队列,并创建了一个名为myappqueue的专用队列

当我运行应用程序并使用Endpoint.Start到达该行时,出现以下错误:

故障转发要求使用“EndpointConfiguration.SendFailedMessageTo()指定错误队列”


我错过了什么?此配置未在特定的文档站点上的示例中提及。

当创建并运行端点时,消息处理可能会失败。在这种情况下,NServiceBus需要将失败消息转发到您需要指定的指定错误队列<代码>端点配置。SendFailedMessageTo()是用于配置要使用的错误队列的API


在配置端点以进行错误处理时,您会发现这很有帮助。而且,由于您是NServiceBus的新手,这也会对您有所帮助。

问题是,本教程完全关注LearningTransport,这与学习目的背道而驰。无论如何,在阅读MSMQ页面时,我显然是完全失明的,因为现在我在开头突出显示的框中看到了这样一句话:当使用MSMQ作为传输时,还必须指定错误队列配置。我真傻,谢谢你指出这一点。:-)@CarstenGehling您的评论很重要(“教程完全关注LearningTransport,这有点违背目的”)。你能把它作为对教程的反馈吗?在中,有一个提供反馈的方法。非常感谢。