Weird intermittent error occures while sending messages using NServiceBus

147 Views Asked by At

We are seeing very strange intermittent error in our logs with the NServiceBus code stack trace

NServiceBus version that we are using is 3.3.4

Here the stack trace of the error:

System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at NServiceBus.MessageHeaders.MessageHeaderManager.NServiceBus.MessageMutator.IMutateOutgoingTransportMessages.MutateOutgoing(Object[] messages, TransportMessage transportMessage)
   at NServiceBus.Unicast.UnicastBus.InvokeOutgoingTransportMessagesMutators(Object[] messages, TransportMessage result)
   at NServiceBus.Unicast.UnicastBus.MapTransportMessageFor(Object[] rawMessages, TransportMessage result)
   at NServiceBus.Unicast.UnicastBus.SendMessage(List`1 addresses, String correlationId, MessageIntentEnum messageIntent, Object[] messages)
   at NServiceBus.Unicast.UnicastBus.SendMessage(Address address, String correlationId, MessageIntentEnum messageIntent, Object[] messages)
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IBus.Send(Object[] messages)

Any ideas what is the issue ? Our production code from time to time fails because of this and we need to know why.

Thanks. Any help would be appreciated.

0

There are 0 best solutions below