2013-03-28 10:18:32,374 [Worker.5]
WARN NServiceBus.Unicast.UnicastBus [(null)] <(null)> -
Received an empty message - ignoring.
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.
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());
I reviewed NServicebus publishing event - recieves empty message, but that didn't help, I don't have read only properties.
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.
One other thing which I found was, I was using
IWantCustomInitialization
with below configuration:I didn't specify assembly type of my message in Configure. With adding that resolved the problem.