azure-functions-extension icon indicating copy to clipboard operation
azure-functions-extension copied to clipboard

DaprBindingTrigger not triggering when running dapr locally

Open MarekLani opened this issue 1 year ago • 1 comments

I have been developing azure function (tried both isolated and in process model) which utilizes the Dapr trigger binding, set to connect to Azure Service Bus. Azure function is supposed to get invoked with new message landing in the queue. When testing the setup locally I noticed very strange behavior. If I run the app using dapr run command, function doesn't get invoked. However if I start functions project via VS Code and only then start dapr, the trigger gets invoked on the already running function instance

This is my dapr.yaml file which I reference in command dapr run -f . -H 3500

version: 1
common:
  resourcesPath: ./components
apps:
  - appDirPath: ./functions-be
    appID: functionapp
    command: ["func", "host", "start"]
    appPort: 3001
    daprHTTPPort: 3500
    logLevel: ''
    enableApiLogging: true    ```

And this is my service bus component:

apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: servicebus spec: type: bindings.azure.servicebusqueues version: v1 metadata:

  • name: connectionString # Required when not using Azure Authentication. value: "Endpoint=sb://.servicebus.windows.net/;SharedAccessKeyName=policy1;SharedAccessKey=<accessKey>;EntityPath=queue1"
  • name: queueName value: "queue1"

MarekLani avatar Dec 05 '23 09:12 MarekLani

May I know where is your function app running AKS or ACA or on-prem?

raorugan avatar Mar 22 '24 10:03 raorugan