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 内部的一个问题
有人遇到过这种情况么?
保罗
解决方案
推荐阅读
- mongodb - MongoDB连接认证
- arrays - 绘图从数组中获取一种颜色,tradingview 样式菜单显示整个数组
- reactjs - Google Cloud Firestore 中的集合数据在加载时会重复每个条目
- typescript - Typescript Generic Enum Type 用于确定接口字段的类型
- webpack - eslint-webpack-plugin 没有输出文件也没有错误
- javascript - 如何使用按钮过滤引导卡?
- amazon-web-services - 我们的一个存储桶上的奇怪 S3 性能
- javascript - 如何避免在字符串 javascript 等中出现重复字符?
- r - 在数据框中使用正则表达式以提取部分列
- javascript - HTML未在浏览器中使用jQuery附加for循环呈现