Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
585 stars 781 forks source link

Bug with Re-Send Selected Message in Azure Portal #721

Open jimmytricks opened 1 month ago

jimmytricks commented 1 month ago

Hi folks,

I believe there might be a bug when trying to re-send messages from an azure service bus dead-letter queue.

Scenario: We tried to resend 20 dead letter queue messages and they came straight back into the dead letter queue (increased the dead letter queue by 20) but instead of their regular body size of around 800-900b, they are only 4b and seem to be an empty message.

If we manually click on a message and then click on 'Load complete message body' and then try to send, this works. It appears the bug is that without loading the complete message body you aren't able to re-send a message and instead it creates another empty message.

Please see attached image:

Image

In the above, you will see message id starting FE9 has message text (because I have clicked load complete message body), but message id 73D does not. When I click re-send selected messages only the one with the loaded message text processes successfully, the other one creates an empty 4b new dead letter queue message.

Thanks

EldertGrootenboer commented 1 month ago

This is by design, as large messages are enabled. In this case, the message body has to be explicitly loaded, as mentioned in the information bar being displayed.

Image

This is to prevent memory issues when loading in messages. As the portal uses the browsers memory to load the message, loading these by default could result in issues or unexpected behavior. As such, when working with messages in an entity that has large message support enabled, you would need to first load the message body before sending the message.

Image

jimmytricks commented 1 month ago

Thanks for the quick reply @EldertGrootenboer , that makes sense why the message does not load, thanks.

However, the part I would consider a bug/issue is that for these messages which have not loaded you are still allowing a user to attempt to re-send, which is then causing the unexpected blank/empty message. At best this causes confusion, at worse these messages could easily cause unexpected errors in whatever is reading from the service bus, if it is not expecting / able to handle these blank/empty messages (as we saw ourselves).

Would there be a consideration to not allow the re-sending of messages where the body has not been loaded, as I think this would be a nice fix for the issue.

Secondly, would there be a recommended way to bulk re-send large messages where the body hasn't yet loaded, without having to manually click through them all first to load the message body?

Thanks for your time 😄

EldertGrootenboer commented 1 month ago

We are going to investigate options here for making this behavior clearer. Once we have an update, we will respond on this thread.

jimmytricks commented 4 weeks ago

Awesome, thanks for the heads up @EldertGrootenboer