Azure-docs: QueueTrigger example in "Automatic triggers" doesn't work

Created on 23 May 2019  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

The QueueTrigger example in the Automatic triggers section doesn't work, it throws a FunctionIndexingException:

Error indexing method 'MyClass.Run'

Inner exception is InvalidOperationException:

Unable to resolve binding parameter 'myQueueItem'. Binding expressions must map to either a value provided by the trigger or a property of the value the trigger is bound to, or must be a system binding expression (e.g. sys.randguid, sys.utcnow, etc.).


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 app-service-wesvc assigned-to-author in-progress product-question triaged

Most helpful comment

The issue is that the sample code uses incorrect expression: "samples-workitems/{myQueueItem}". Here, the runtime cant resolve the "myQueueItem". If you take a look at the referenced article on binding expressions here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#trigger-metadata , you'll see that instead "myQueueItem" you should use "QueueTrigger", the full expression should be "samples-workitems/{QueueTrigger}". So this is exactly incorrect docs issue @SnehaAgrawal-MSFT.

All 6 comments

@thomaslevesque Thanks for the question! We are investigating and will update you shortly

@thomaslevesque We kindly request you to share your question on MSDN or Stack Overflow. We try to keep this GitHub channel scoped to just issues related to Azure Docs. Thank you for your understanding.We will now proceed to close this thread here.

But the issue is related to Azure docs... It gives an example that doesn't work.

The issue is that the sample code uses incorrect expression: "samples-workitems/{myQueueItem}". Here, the runtime cant resolve the "myQueueItem". If you take a look at the referenced article on binding expressions here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#trigger-metadata , you'll see that instead "myQueueItem" you should use "QueueTrigger", the full expression should be "samples-workitems/{QueueTrigger}". So this is exactly incorrect docs issue @SnehaAgrawal-MSFT.

@thomaslevesque Thanks for Clarification. My Apology for late response and inconvenience with this issue. Your feedback has been shared with the content owner for further review.

@andriysavin you are essentially correct. The Blob input binding is basically getting passed the queue trigger itself, not the binding parameter. This is a special case for Blob storage that supports a key storage pattern: queue triggering of blob processing. I'll get this fixed ASAP.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpowell2017 picture ianpowell2017  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments