Created
January 8, 2021 14:51
-
-
Save tehmufifnman/3e76c5c500cd099658ca26b30bfd29ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("SampleMessageExecutor")] | |
public static async Task Run( | |
[ServiceBusTrigger("test-queue", "test-subscription", Connection = "ServiceBusConnectionString")] | |
MessageReceiver messageReceiver, string lockToken) | |
{ | |
//the new data is optional | |
//you can also use CompleteAsync() or DeadletterAsync() | |
await messageReceiver.AbandonAsync(lockToken, new Dictionary<string, object> | |
{ | |
{"new-data", "new-value"} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0", | |
"extensions": { | |
"serviceBus": { | |
"messageHandlerOptions": { | |
"autoComplete": false | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment