ServiceBusExplorer icon indicating copy to clipboard operation
ServiceBusExplorer copied to clipboard

Repair and Resubmit selected message not working for Dead Letter Message for Topics

Open mlakshminara opened this issue 6 years ago • 9 comments

When in Repair and resubmit selected message window and when we select a message to resubmit to topic using the "Submit" button.

The log windows shows "Messages where moved to [topic-name] in [time-taken-in-ms] milliseconds." message but the message is not shown when I peek both in Azure Portal and also in Explorer. The message is not getting published to the topic when we perform repair and submit the message.

In case if you have selected "delete from DLQ" which usually is required, message get deleted in DLQ and it is not published back to topic eventually leading to loss of message. Azure_Explorer_Dead_Letter_Msg_Resubmit_For_Topic.docx

mlakshminara avatar Nov 02 '20 10:11 mlakshminara

Are you saying that the tool doesn't do what it says in the log? Are you 100% sure? The repair and resubmit functionality has been created years ago and no one reported this issue so far. Can you please provide evidence? When you resubmit the message, you need to make sure that it satisfies the conditions of the landing subscription. Can you please make a repro selecting a queue instead of a topic or to create an auditing subscription with a filter equal to 1=1 under the topic? Thanks

paolosalvatori avatar Nov 13 '20 10:11 paolosalvatori

I have tried using both queue and topic and it failed only for topic and queue re-submit was successful. See the document attached - Azure_Explorer_Dead_Letter_Msg_Resubmit_For_Topic.docx I can also try for a vanilla topic with default filter (1=1) and see whether it works

mlakshminara avatar Nov 19 '20 08:11 mlakshminara

@mlakshminara , I just tried this and it worked. I see that you are getting some validation errors when the message is peeked. Please try using another message where you don't get any complaints when it is being read. It might be that the content of the message property is scrambled when resent and the rule is not working due to that.

Lastly, since a cause could be that someone is reading it from the subscription make the subscription forward messages to a queue and see if the message ends up there.

ErikMogensen avatar Nov 28 '20 14:11 ErikMogensen

Closing due to no response. If you, @mlakshminara, still have a problem with this just create a new message in this thread.

ErikMogensen avatar Jan 08 '21 17:01 ErikMogensen

Hi @ErikMogensen - I worked on this issue with @mlakshminara. We determined that the behavior he found - a message moved off DLQ back to topic but not showing on the topic - appeared only when a very short TTL was set on the message. @mlakshminara was setting a message TTL of 0.01 seconds. When we set the TTL to 30 seconds and other "reasonable" values, SB Explorer worked exactly as expected - message showed on topic.

I checked for a documented minimum message TTL at these references, but was unable to find: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#service-bus-limits https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-expiration https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-troubleshooting-guide

Can you please share any guidance on minimum message TTL?

Also, I checked a Windows machine with SB Explorer for extra logging info over what is shown in the SB Explorer log pane (verified app config had debug=true). Could not find a log, or events in Windows Application Event log. Is there a way to inspect more detailed info of what's happening, short of debugging/setting watches and breakpoints?

plzm avatar Feb 12 '21 14:02 plzm

@plzm setting TTL to such a short time will like expire message before it can even be reported by the topic. The minimal value is not documented but I’d be surprised if it was less than at least a few seconds. Just for kicks, try the Portal Explorer for ASB and see what value is enforced there. My gut feeling it’s a bug with the API. It accepts values lower than the minimum and the Portal explorer might prevent it.

SeanFeldman avatar Feb 12 '21 15:02 SeanFeldman

@SeanFeldman great idea - portal SB Explorer enforces minimum 5 seconds. I'll communicate that back. Thank you!

plzm avatar Feb 12 '21 15:02 plzm

@plzm , great to see that you found the cause.

Regarding logs of what is happening, it seems that service bus explorer sends sends the message to the service bus service in Azure otherwise it should throw an exception which should be logged. After the Service Bus service has received the messages there are no logs available for us deadly to determine what happens inside it as far as I know. Microsoft Support may be able to see something.

ErikMogensen avatar Feb 12 '21 16:02 ErikMogensen

Got it, thank you @ErikMogensen and @SeanFeldman for your help!

plzm avatar Feb 12 '21 20:02 plzm