Heartbeat Serialization Error in Service Monitoring Instance

I’m experimenting with Service Control/Service Pulse in a DEV environment. Metrics are working without any issues, but I’m having some trouble with heartbeats. The Service Monitoring instance is throwing a serialization error when it processes the heartbeat messages.

My endpoint is using NServiceBus.Heartbeat 2.0.0 with NServiceBus 6.4.3. The Service Monitoring instance is 1.1.3. Here are the log entries that show the exception being thrown from inside Service Monitoring:

2018-05-03 14:49:35.2517|29|Warn|NServiceBus.DeserializeLogicalMessagesConnector|Could not determine message type from message header ‘ServiceControl.Plugin.Heartbeat.Messages.EndpointHeartbeat’. MessageId: 5f7bfba2-b824-4328-a25e-4cfb533c6b3b

2018-05-03 14:49:35.6877|33|Error|NServiceBus.RecoverabilityExecutor|Moving message ‘5f7bfba2-b824-4328-a25e-4cfb533c6b3b’ to the error queue ‘NServiceBus_ErrorQueue’ because processing failed due to an exception:
NServiceBus.MessageDeserializationException: An error occurred while attempting to extract logical messages from transport message 5f7bfba2-b824-4328-a25e-4cfb533c6b3b —> System.Exception: Could not find metadata for ‘Newtonsoft.Json.Linq.JObject’.
Ensure the following:

  1. ‘Newtonsoft.Json.Linq.JObject’ is included in initial scanning.
  2. ‘Newtonsoft.Json.Linq.JObject’ implements either ‘IMessage’, ‘IEvent’ or ‘ICommand’ or alternatively, if you don’t want to implement an interface, you can use ‘Unobtrusive Mode’.
    at NServiceBus.Unicast.Messages.MessageMetadataRegistry.GetMessageMetadata(Type messageType)
    at NServiceBus.Pipeline.LogicalMessageFactory.Create(Type messageType, Object message)
    at NServiceBus.DeserializeLogicalMessagesConnector.Extract(IncomingMessage physicalMessage)
    at NServiceBus.DeserializeLogicalMessagesConnector.ExtractWithExceptionHandling(IncomingMessage message)

I’m not sure whether I’ve run into some kind of bug or something isn’t setup correctly (probably the second option). Before I dig any further, I wanted to check if there was something obvious that I am doing wrong based on the exception.


1 Like

False alarm.

Heartbeats were being sent to the monitoring queue rather than service control queue. I misunderstood where they should be routed. Everything is working correctly now.