After making my first function a few months back, I decided it needed to be renamed, so I deleted it and started over. And I've now spent my entire day regretting it :). I appreciate anyone who's willing to take the time to help me out.
Using VsCode, I deployed a js Azure function with a queue trigger. Testing the code in the portal works as expected. When I send a message to the queue, I can see the message enter the queue, and then it disappears shortly after. However, the function logs never show it received the message. The functions intended action also never takes place.
Here is the host.json file incase it's relevant:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.*, 4.0.0)"
},
"concurrency": {
"dynamicConcurrencyEnabled": true,
"snapshotPersistenceEnabled": true
}
}
Here is the function.json file:
{
"bindings": [
{
"name": "queueItem",
"type": "queueTrigger",
"direction": "in",
"queueName": "tenantfunctionqueue",
"connection": "Storage"
}
]
}
Please let me know if additional information would be helpful.
I've tried using both connection strings and assigning the function the Storage Queue Data Contributor role. I tried each independently and concurrently.
More specifically, I edited the Configuration > ApplicationSettings > AzureWebJobsStorage value to be the connection string of the Storage account holding my queue. The Storage resource and the Function App are in the same Resource Group.
With the Azure role assignment approach, I also edited the AzureWebJobsStorage to have the name AzureWebJobsStorage__nameofstorageaccount and gave it the value nameofstorageaccount.
I've triple and quadruple checked things, so I feel like I must be missing something in the process. Is anyone aware of any less-documented gotchas? It feels important that my queue messages disappear immediately after being received? Any help would really be appreciated!
Also I've seen that a c# implementation requires a decorator to specify the connection string, but as far as I can tell there is no equivalent in js? Just the module.exports = async function (context, queueItem) {} function. So I'm assuming I'm not doing anything wrong there.



