Azure / azure-webpubsub

Azure Web PubSub Service helps you to manage WebSocket connections and do publish and subscribe in an easy way
https://azure.github.io/azure-webpubsub/
MIT License
130 stars 85 forks source link

Please add Azure Web PubSub to the Azure functions extension bundle #223

Open mithunshanbhag opened 2 years ago

mithunshanbhag commented 2 years ago

Currently, Microsoft.Azure.WebJobs.Extensions.WebPubSub is not a part of the functions extension bundle and I'm forced to register it separately.

func extensions install --package Microsoft.Azure.WebJobs.Extensions.WebPubSub --version 1.0.0-beta.3

Would it be possible to add this package to the functions extension bundle?

JialinXin commented 2 years ago

Yes. It's in progress and will take some time for a new package of bundle release. Will update when this is done.

oadrian2 commented 1 year ago

The bundle package (3.4 or later) seems to be missing the webPubSubContext trigger even though it has the extension package listed

ksdaniel commented 1 year ago

I am not sure there is someone still following this thread - but, webPubSubContext is still missing.

JialinXin commented 1 year ago

@ksdaniel @oadrian2 It should be able to work with bundle v3.3.0+. Please confirm the extension bundle is 3.3.0+ like below in host.json.

"extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.3.*, 4.0.0)"
  }

And WebPubSubContext is the input binding type to use like below. Please check sample.

{
  "disabled": false,
  "bindings": [
    {
      "authLevel": "anonymous",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "$return"
    },
    {
      "type": "webPubSubContext",
      "name": "wpsReq",
      "direction": "in"
    },
    {
      "type": "webPubSub",
      "name": "actions",
      "hub": "sample_funcchat",
      "direction": "out"
    }
  ]
}