3
votes

I want to fetch messages from service bus queue in azure, for all triggers other than HttpTrigger and kafkaTrigger I need to specify a value (connection string) for AzureWebJobsStorage in local settings. I have a blob storage deployed in azure so I took connection string of the storage account and put it in loca.settings.json

    {
  "IsEncrypted": false,
  "Values": {
  "FUNCTIONS_WORKER_RUNTIME": "java",
    "AzureWebJobsStorage" : "DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;EndpointSuffix=core.windows.net",
   "myConnection" : "<Connection string>"
  }
}

but I get an exception from azure

The 'messageReceiver' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.messageReceiver'. Microsoft.WindowsAzure.Storage: No valid combination of account information found.

I checked multiple times connection string is right. They said I need to remove endpoint suffix but that didn't work. Thank you in advance.

1

1 Answers

0
votes

Azure Function Storage account requirements

When creating a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. This is because Functions relies on Azure Storage for operations such as managing triggers and logging function executions. Some storage accounts don't support queues and tables. These accounts include blob-only storage accounts, Azure Premium Storage, and general-purpose storage accounts with ZRS replication. These unsupported accounts are filtered out of from the Storage Account blade when creating a function app. detailhere

You can use local storage account, if you're using Windows 10 machine