NServiceBus不反序列化消息

时间:2018-10-01 14:31:22

标签: json.net nservicebus

我使用NServiceBus进行了简单的发送器/接收器设置

双方都有:

Newtonsoft.Json (11.0.2)
Newtonsoft.Bson (1.0.1)
NServiceBus.Newtonsoft.Json (2.1.0)

当NServiceBus尝试反序列化消息时,出现以下错误

2018-10-01 14:39:47.383 ERROR NServiceBus.RecoverabilityExecutor Moving message 'a687555c-d4be-49dc-acba-a96c00e0d261' to the error queue 'error' because processing failed due to an exception:
NServiceBus.MessageDeserializationException: An error occurred while attempting to extract logical messages from incoming physical message a687555c-d4be-49dc-acba-a96c00e0d261 ---> 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)

我真的不确定该怎么做,因为从外观上来看,这是Newtonsoft内部的问题

还有其他人遇到过吗?

保罗

0 个答案:

没有答案