I'm currently working on a system composed of multiple C# .NET 7 applications that communicate via message publishing and subscription mechanisms. These applications extensively use Azure Service Bus for both cloud development and production purposes.
We are encountering a challenge when using ServiceInsight to monitor our messaging system. The issue revolves around the presence of numerous "Unknown Message Type" messages, which clutter our view and make it difficult to distinguish the working messages from these unknown ones. It's worth noting that these "Unknown Message Type" messages lack any message body, error information, or sequence diagrams. Our logs do not reveal any errors related to these messages either, providing only limited header information.
Here are the versions of the key components we are using:
- ServiceInsight: 2.13.0
- ServiceControl: 4.32.2
- ServicePulse: 1.37.0
And the NuGet packages included in our project
- NServiceBus: 8.0.3
- NServiceBus.RabbitMQ: 8.0.1 (Used for local)
- NServiceBus.Metrics.ServiceControl: 4.0.0
- NServiceBus.Newtonsoft.Json: 3.0.0
- NServiceBus.ServicePlatform.Connector: 2.0.1
- NServiceBus.Transport.AzureServiceBus: 3.2.0
We are seeking guidance or insights on how to address or troubleshoot this issue effectively. Any assistance would be greatly appreciated. Thank you in advance for your help!
What I've Tried:
I've made several attempts to address the issue of "Unknown Message Type" messages in our system, but so far, I haven't been able to pinpoint the source of the problem. Here's what I've done:
Queue and Subscription Reset: I started by deleting all the queues and subscriptions in our system and rebuilt them from scratch, hoping to eliminate any potential misconfigurations. However, this didn't resolve the issue, and we still encounter numerous "Unknown Message Type" messages.
Examination of Subscriptions: I thoroughly reviewed all the relevant subscriptions to ensure that they are correctly set up. Everything appears to be in order, and there are no unusual configurations or errors that might be contributing to the problem.
Software and Code Inspection: I've also inspected the software and codebase extensively, but I haven't been able to identify any particular piece of code or configuration that could be causing the "Unknown Message Type" messages to be generated.
Expected Outcome:
My primary goal is to put an end to the continuous influx of "Unknown Message Type" messages and have ServiceInsight display only the messages with the correct message types.
The issue is likely with the messages and not the infrastructure. NServeBus relies on the custom headers to identify the message type and it's intent. Inspect the message headers to see if those are even found. Specifically, look for the
NServiceBus.EnclosedMessageTypes
header. It should tell what type each message is. If you don't see it, then there is a problem with one the following.And don't purge and wipe entities in the namespace in production. That will only exacerbate the problem.