问题
ASP.NET Webjobs is incorrectly deleting a message in a queue when there is a binding failure. The correct process should be that the message is not deleted and reappears after the visibility timeout to be processed again.
Here is the invocation log
running in pid: 6424
Timestamp:10:02:27 PM
Parameters bound. Invoking user function.
--------
--------
Exception while executing:
System.InvalidOperationException, Error while binding function parameters.
at Microsoft.WindowsAzure.Jobs.RunnerProgram.InvokeWorker(MethodInfo m, BindResult[] binds, ParameterInfo[] ps)
at Microsoft.WindowsAzure.Jobs.RunnerProgram.Invoke(IConfiguration config, MethodInfo m, FunctionInstanceGuid instance, IRuntimeBindingInputs inputs, ParameterRuntimeBinding[] argDescriptors)
at Microsoft.WindowsAzure.Jobs.RunnerProgram.Invoke(FunctionInvokeRequest invoke, IConfiguration config)
at Microsoft.WindowsAzure.Jobs.RunnerProgram.MainWorker(FunctionInvokeRequest descr, IConfiguration config)
FAIL
Has anyone else come across messages being incorrectly dequeued (deleted) when using Webjobs SDK?
The binding failure is due to invalid JSON format in the input, but I think that unless there is a proper exit to the invocation I don't think the input message should be deleted.
This is the method signature in the webjobs console app
public static void CreateCertificate(
[QueueInput ("certificaterequest") ] CertificateRequest inputcertificate,
[QueueOutput ("certificatemade") ] out CertificateRequest outputcertificate,
[BlobOutput ("certificatemade/{Guid}")] TextWriter writer)
{
回答1:
It looks like a bug. I've logged it and we are going to do more investigation.
Thanks for reporting this!
来源:https://stackoverflow.com/questions/23475636/azure-webjobs-sdk-is-deleting-a-message-when-there-is-a-binding-failure-bug