NServiceBus - 服务器向控制台抛出空消息警告 [英] NServiceBus - Server is throwing empty message warning to the console

查看:59
本文介绍了NServiceBus - 服务器向控制台抛出空消息警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

2013-03-28 10:18:32,374 [Worker.5] 
WARN  NServiceBus.Unicast.UnicastBus [(null)] <(null)> - 
Received an empty message - ignoring.

我有一个客户端, bus.send("server", command) 从 mvc4 网站到消息处理器.消息处理器设置为默认值,没有任何自定义初始化.

I have a client that bus.send("server", command) going from an mvc4 website to a message processor. The message processor was setup to be default without any custom initialization.

这是我在global.asax中网站端的配置

This is my configuration on the website side in the global.asax

        Configure.With()
            .StructureMapBuilder(container)
            .JsonSerializer()
            .Log4Net()
            .MsmqTransport()
                .IsTransactional(false)
                .PurgeOnStartup(true)
            .UnicastBus()
                .ImpersonateSender(false)
            .CreateBus()
            .Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());         

我查看了 NServicebus 发布事件 - 收到空消息,但这并没有没用,我没有只读属性.

I reviewed NServicebus publishing event - recieves empty message, but that didn't help, I don't have read only properties.

推荐答案

该问题类似于 OP 中的链接问题.我发现序列化方法需要在发送方和服务器之间匹配.我必须在服务器端添加自定义初始化,并添加 defaultbuilder 和 json 序列化器以匹配 Web 端,以便消息正常工作.

The problem is similar to the linked question in the OP. I found that the serialization methods need to match between the sender and the server. I had to add custom initialization on the server side and add the defaultbuilder as well as the json serializer to match the web side in order for messages to work right.

这篇关于NServiceBus - 服务器向控制台抛出空消息警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆