Created Azure function with service bus trigger and deployed in azure portal. Using servicebusexplorer, sending the queue to portal and working fine. But after stopped the function in azure, sending the message from explorer to local code in visual studio for debugging. But it doesn't fire.
I have given service connection string in local.settings.json and queue name are correct. It throwing the error in azure CLI after running the function from visual studio.
ERROR:
MessageReceiver error (Action=Receive, ClientId=MessageReq.queue, Endpoint=sss-bbbb.servicebus.windows.net)xxxxx.queue, EntityPath=sss.ccccc
Microsoft.Azure.ServiceBus: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ErrorCode: TimedOut. System.Private.CoreLib: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
local.settings.json
{
"IsEncrypted": false,
"Values":
{
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"ServiceBusConnectionString": "Endpoint=//",
"RequestTimeout": "600000"
}
I have had a similar issue with s corporate firewalls blocking the Service Bus traffic.
I appended TransportType=AmqpWebSockets to the end of my connection string and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With