azure-service-bus-dotnet
azure-service-bus-dotnet copied to clipboard
MessageInteropExtensions.GetBody<T>() potential bug?
The method has the following block prior to attempting payload deserialization:
https://github.com/Azure/azure-service-bus-dotnet/blob/9d4d1ca430ab9b068537378c485005872065f874/src/Microsoft.Azure.ServiceBus/Extensions/MessageInterOpExtensions.cs#L83-L86
I've tried sending a message using sender.SendAsync(new BrokeredMessage(byte[]))
and retrieving message using the new client with
var msg = await receiver.ReceiveAsync()
msg.GetBody<byte[]>()
as well as senging using sender.SendAsync(new BrokeredMessage(new MemoryStream(byte[])))
, but the block has never executed. What's the scenario it serves?
@Azure/azure-service-bus-write ping
Could you try sending messages using old client with message body of type https://github.com/Azure/azure-service-bus-dotnet/blob/9d4d1ca430ab9b068537378c485005872065f874/src/Microsoft.Azure.ServiceBus/Amqp/AmqpMessageConverter.cs#L531-L546
No luck @nemakam. That block never executes.
@nemakam any updates on your end?
I haven't had time to look into this task. There are few higher priority tasks that I'm looking into. As of now, we don't know any scenario which is failing because of this, do we?
As of now, we don't know any scenario which is failing because of this, do we?
I have a use case where I want to go through the extension as I don't know if the sender has sent byte that were serialized or not. According to the code, ASB should be able to determine if bytes were sent w/o encoding and return earlier with no need to go through decerialization part. Yet is failing, causing my code to throw.
It's not something blowing up in production, but if this code does nothing A) Should be removed not to confuse B) If it's there for a reason, then it's not wroking.
@nemakam I'm at the point where I need to handle messages from old and new client and this issue become relevant again.