我正在使用 MassTransit 的 sqs 运输。在真正的 aws sqs 设置上,一切都很好。但是,在使用 localstack 进行本地开发时,我遇到了以下错误。
MassTransit.Messages[0]
R-FAULT amazonsqs://us-east-1/UpdateName f28f6a22-f0dd-4ffa-926f-2b8c871c8bf0 Value cannot be null.
Parameter name: source
System.Runtime.Serialization.SerializationException: An exception occurred while deserializing the message envelope ---> System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at MassTransit.Serialization.JsonConsumeContext..ctor(JsonSerializer deserializer, IObjectTypeDeserializer objectTypeDeserializer, ReceiveContext receiveContext, MessageEnvelope envelope)
at MassTransit.Serialization.JsonMessageDeserializer.MassTransit.IMessageDeserializer.Deserialize(ReceiveContext receiveContext)
--- End of inner exception stack trace ---
at MassTransit.Serialization.JsonMessageDeserializer.MassTransit.IMessageDeserializer.Deserialize(ReceiveContext receiveContext)
at MassTransit.Serialization.SupportedMessageDeserializers.Deserialize(ReceiveContext receiveContext)
at MassTransit.Pipeline.Filters.DeserializeFilter.Send(ReceiveContext context, IPipe`1 next)
at GreenPipes.Filters.RescueFilter`2.GreenPipes.IFilter<TContext>.Send(TContext context, IPipe`1 next)
dbug: MassTransit.AmazonSqsTransport.Pipeline.ConfigureTopologyFilter<MassTransit.AmazonSqsTransport.Topology.ErrorSettings>
这只是最新的 MassTransit (5.5.1) 的问题,但在 5.3.0 版本中它可以正常工作。
任何解决此错误的帮助将不胜感激。