Nservicebus hello world 进程托管!
我正在尝试使用 nservicebus 作为解决方案,而不是使用 WCF MSMQ 绑定。 我试图通过修改全双工示例来使进程中的 hello world 工作。我已经知道我从客户端发送消息并且服务器接收它(通过在服务器端打印接收到的消息来猜测),但请求消息处理程序不知何故未注册并且在收到时没有被调用,即没有达到我设置的断点。
我想我应该在配置服务器时注册一个处理程序 -
//initialise nservice bus
Bus = NServiceBus.Configure.With()
.Log4Net()
.DefaultBuilder()
.XmlSerializer()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(false)
.CreateBus()
.Start();
抱歉,这可能是一个非常愚蠢的问题,但只是想开始,并且示例中的进程内托管示例很简单。
任何指向示例的指针或链接都会很棒。
BR 尼拉德里
I am trying out nservicebus as a solution instead of using WCF MSMQ binding.
I have tried to get a in process hello world working by mofigying the full duplex sample. I have got it to the point that I am sending message from the client and the server receives it ( guessing by received messages being printed on the server side) but the request message handler is somehow not registered and is not being called on receipt , i.e not hitting breakpoints that I set.
I think i am supposed to register a handler when configuring the server using -
//initialise nservice bus
Bus = NServiceBus.Configure.With()
.Log4Net()
.DefaultBuilder()
.XmlSerializer()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(false)
.CreateBus()
.Start();
Sorry it could be a very silly question , but just want to get started and the samples are light on in-process hosting examples.
Any pointers or link to examples would be great.
BR
Niladri
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在 .UnicastBus() 之后缺少 .LoadMessageHandlers() 。
You're missing .LoadMessageHandlers() after .UnicastBus().