I'm getting a SerializationException when the consumer tries to deserialize the message envelope:
SerializationException: An exception occurred while deserializing the message envelope ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: S. Path '', line 1, position 1.
This is the message when I print it in a bus observer IReceiveObserver.PreReceive using Encoding.UTF8.GetString(context.GetBody()):
Sw? ?{
"messageId": "25760000-5d02-0015-f539-08d69645011f",
"conversationId": "25760000-5d02-0015-f70b-08d69645011f",
"sourceAddress":...
I have peeked the message with Service Bus Explorer and finds that it looks correct there:
{
"messageId": "25760000-5d02-0015-f539-08d69645011f",
"conversationId": "25760000-5d02-0015-f70b-08d69645011f",
"sourceAddress": ...
I can see that the message is 8 bytes larger when my consumer reads the message when I compare the size in Service Bus Explorer 1777 bytes vs 1185 bytes.
The extra byres are always 0, 83, 119, 176, 0, 0, 4, 153
My consumer uses the following packages:
<packages>
<package id="GreenPipes" version="2.1.3" targetFramework="net472" />
<package id="MassTransit" version="5.3.1" targetFramework="net472" />
<package id="MassTransit.AzureServiceBus" version="5.3.1" targetFramework="net472" />
<package id="MassTransit.RabbitMQ" version="5.3.1" targetFramework="net472" />
<package id="Microsoft.Azure.Services.AppAuthentication" version="1.0.3" targetFramework="net472" />
<package id="Microsoft.Diagnostics.Tracing.EventSource.Redist" version="1.1.28" targetFramework="net472" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.19.8" targetFramework="net472" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net472" />
<package id="NewId" version="3.0.1" targetFramework="net472" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net472" />
<package id="Newtonsoft.Json.Bson" version="1.0.1" targetFramework="net472" />
<package id="RabbitMQ.Client" version="5.1.0" targetFramework="net472" />
<package id="System.IdentityModel.Tokens.Jwt" version="4.0.4.403061554" targetFramework="net472" />
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="Topshelf" version="4.2.0" targetFramework="net472" />
<package id="WindowsAzure.ServiceBus" version="5.1.0" targetFramework="net472" />
</packages>
And thanks for a great project!
Regards,
Niklas