Azure / azure-functions-dotnet-worker

Azure Functions out-of-process .NET language worker
MIT License
431 stars 184 forks source link

DeadLetterReason and DeadLetterErrorDescription not store when using ServiceBusMessageActions.DeadLetterMessageAsync #2840

Open pgilhuijs opened 1 week ago

pgilhuijs commented 1 week ago

Description

In our Azure function app code (.net 8 isolated mode) , autocompletemessages = off and manual deadlettering is done. I noticed that when using ServiceBusMessageActions.DeadLetterMessageAsync and providing the DeadLetterReason and DeadLetterDescription it will fail to store it intermittently.

I've included a repro solution in the attachment.

Steps to reproduce

DeadLetterRepro.zip

Make sure you have properly configured the connection strings in settings and program and set the queue name. It is a repro solution with an azure function app. It accepts requests using an http trigger and that will put messages on a queue. A service bus trigger will react on it and then deadletter it. After this a second trigger is retrieving the deadletter and logging it. If reason or description is empty, you'll see an error logged. Just keep sending until it reports an error.

jviau commented 2 days ago

@JoshLove-msft do you know why this is not being persisted?

JoshLove-msft commented 2 days ago

@pgilhuijs can you include the error that you are hitting?