# Node Serverless and Azure Service Bus

**URL:** <https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726>\
**Category:** Serverless Framework\
**Tags:** azure\
**Created:** [July 7, 2019, 1:09pm UTC](https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726 "2019-07-07T13:09:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dysnomia](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/dysnomia/32/3458_2.png) [@Dysnomia](https://forum.serverless.com/u/Dysnomia)\
**Post date:** [July 7, 2019, 1:09pm UTC](https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726/1 "2019-07-07T13:09:47Z")

</div>

Hi, i’m trying to make un function that listen a Azure service bus queue, i used the example given here : [https://serverless.com/framework/docs/providers/azure/events/servicebus/](https://serverless.com/framework/docs/providers/azure/events/servicebus/)

But, after deploying on Azure, when i go to my function i have this message :  
**Error:**  
Function error (email) : The binding type(s) ‘serviceBusTrigger’ are not registered. Please ensure the type is correct and the binding extension is installed.

And of course my function don’t work.

Here is my serverless.yml :

```auto
service: email-consumer

provider:
  name: azure
  location: West Europe

plugins:
  - serverless-azure-functions

package:
  exclude:
    - .idea/**
    - node_modules/**
    - .gitignore
    - .git/**

functions:
  email:
    handler: handler.email
    events:
      - serviceBus:
        x-azure-settings:
          name: item
          queueName: email-send-request
          accessRights: listen
          connection: ServiceBusConnection

```

package.json :

```auto
{
  "name": "email-consumer",
  "version": "0.1.0",
  "description": "email consumer",
  "main": "handler.js",
  "author": "Dysnomia",
  "license": "UNLICENSED",
  "dependencies": {
    "serverless-azure-functions": "^0.7.0"
  }
}

```

email-function.json :

```auto
{
    "disabled": false,
    "bindings": [
        {
            "type": "serviceBusTrigger",
            "direction": "in",
            "name": "item",
            "queueName": "email-send-request",
            "connection": "ServiceBusConnection",
            "accessRights": "listen"
        }
    ],
    "entryPoint": "email",
    "scriptFile": "handler.js"
}

```

---

<div class="post-metadata">

**Author:** ![kevboutin](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kevboutin/32/1414_2.png) [@kevboutin](https://forum.serverless.com/u/kevboutin)\
**Post date:** [March 5, 2020, 7:32pm UTC](https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726/2 "2020-03-05T19:32:46Z")

</div>

I noticed that the Azure Functions project had a bug regarding the service bus connection settings. This occurs when using servicebus triggers and has nothing to do with the serverless framework. Were you able to get this working since? I am trying to modify local.settings.json to get around the issue as suggested on Azure forums but it’s still not quite working for me. The error I get in the Azure console after deployment is: **Error:**

The function runtime is unable to start. Microsoft.Azure.WebJobs.ServiceBus: Microsoft Azure WebJobs SDK ServiceBus connection string ‘Endpoint=sb://blahblahblah-sbn.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;[Hidden Credential]’ is missing or empty.  
Session Id: e74c5c88d77b489397cb10b25155f483  
Timestamp: 2020-03-05T19:26:15.664Z

---

<div class="post-metadata">

**Author:** ![raviranjandutta](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@raviranjandutta](https://forum.serverless.com/u/raviranjandutta)\
**Post date:** [October 30, 2020, 3:23am UTC](https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726/3 "2020-10-30T03:23:06Z")

</div>

add a host.json file with this content at your project level.  
{  
“version”: “2.0”,  
“extensionBundle”: {  
“id”: “Microsoft.Azure.Functions.ExtensionBundle”,  
“version”: “[1.\*, 2.0.0)”  
}  
}

---

<div class="post-metadata">

**Author:** ![ianrandell](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@ianrandell](https://forum.serverless.com/u/ianrandell)\
**Post date:** [November 5, 2020, 11:54am UTC](https://forum.serverless.com/t/node-serverless-and-azure-service-bus/8726/4 "2020-11-05T11:54:58Z")

</div>

Fyi, it appears that the extensionBundle should be wrapped in an extensions property like this:

```
{
  "version": "2.0",
  "extensions": {
    "extensionBundle": {
      "id": "Microsoft.Azure.Functions.ExtensionBundle",
      "version": "[1.*,2.0.0)"
    }
  },
. . .
```
