NServiceBus简单重试机制,如何调试(基于AsyncPages示例)
嗨
我有一个用户注册的网站,我们需要通过肥皂网络服务调用将他们添加到遗留系统中。这些 Web 服务调用已排队等待异步重试... 我已从 NServiceBus 下载中复制了 AsyncPages 示例。
然而,消息似乎在没有被处理的情况下进出队列(它们也没有被放入错误队列中)。 (日志中显示的消息)
我的网站配置如下:
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="FooComMessages" Endpoint="FooComSignupService"/>
</MessageEndpointMappings>
</UnicastBusConfig>
我在按钮单击上有此测试代码:
Global.Bus.Send(new CreateMemberContractRequest[]
{new CreateMemberContractRequest()
{birthdate = DateTime.Parse("4 oct 1975")}
}
);
我的消息:
namespace FooComMessages
{
[Serializable]
public class CreateMemberContractRequest : IMessage
{
public DateTime birthdate { get; set; }
//.... snip....//
}
}
我的处理程序配置:
<MsmqTransportConfig InputQueue="FooComSignupService" ErrorQueue="FooComSignupServiceErrors" NumberOfWorkerThreads="1" MaxRetries="20" />
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="FooComMessages" Endpoint="FooComSignupService" />
</MessageEndpointMappings>
</UnicastBusConfig>
我的处理程序代码:
namespace FooComSignupService
{
public class CreateMemberContractRequestHandler : IHandleMessages<CreateMemberContractRequest>
{
public IBus Bus { get; set; }
private static readonly ILog Logger = LogManager.GetLogger(typeof(CreateMemberContractRequestHandler));
public void Handle(CreateMemberContractRequest message)
{
Logger.Info("------------------------------------\nHandling CreateMemberContractRequest. id="+message.webdatabaseid);
throw new NotImplementedException();
}
}
}
编辑: 我正在使用 NServiceBus.Host.exe 来托管 FooComSignupService
有谁知道我可能做错了什么? 我也无法在 Handle 方法中命中断点。
干杯。
默里.
Hi
I have a website where a user signs up we need to add them to a legacy system via a soap webservice call. these webservice calls are queue'd for retry asynchronously...
I have copied the AsyncPages sample from the NServiceBus download.
However the messages seem to flit in and out of the queue without being handled (nor are they put on the error queue). (the message shows in the journal)
my website is configured like so:
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="FooComMessages" Endpoint="FooComSignupService"/>
</MessageEndpointMappings>
</UnicastBusConfig>
And I have this test code on a button click:
Global.Bus.Send(new CreateMemberContractRequest[]
{new CreateMemberContractRequest()
{birthdate = DateTime.Parse("4 oct 1975")}
}
);
My message:
namespace FooComMessages
{
[Serializable]
public class CreateMemberContractRequest : IMessage
{
public DateTime birthdate { get; set; }
//.... snip....//
}
}
My Handler Config:
<MsmqTransportConfig InputQueue="FooComSignupService" ErrorQueue="FooComSignupServiceErrors" NumberOfWorkerThreads="1" MaxRetries="20" />
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="FooComMessages" Endpoint="FooComSignupService" />
</MessageEndpointMappings>
</UnicastBusConfig>
My Handler Code:
namespace FooComSignupService
{
public class CreateMemberContractRequestHandler : IHandleMessages<CreateMemberContractRequest>
{
public IBus Bus { get; set; }
private static readonly ILog Logger = LogManager.GetLogger(typeof(CreateMemberContractRequestHandler));
public void Handle(CreateMemberContractRequest message)
{
Logger.Info("------------------------------------\nHandling CreateMemberContractRequest. id="+message.webdatabaseid);
throw new NotImplementedException();
}
}
}
EDIT:
I'm using NServiceBus.Host.exe to host the FooComSignupService
Does anyone have any idea what I could be doing wrong?
I can't hit any breakpoints in the Handle method either.
Cheers.
Murray.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论