Azure Web PubSub is not sending user event to my HTTP endpoint

Junjie Guan 0 Reputation points
2024-07-25T00:54:40.8466667+00:00

I am not able to setup eventhandler that forward user event to my web api.

Maybe I made some dumb mistake. Here is the way to reproduce it.

step 1 Create an azure function with http_trigger1 template

This can be easily done in the UI.

Step 2 Create a webpubsub + eventhandler

Like so:

az group create --name testresourcegroup --location eastus

az webpubsub create --name xxxxtestpubsub --resource-group testresourcegroup --location eastus --sku Free_F1

az webpubsub hub create -n "xxxtestpubsub" -g "testresourcegroup" --hub-name "testhub" --event-handler url-template="https://xxxxfucntion.azurewebsites.net/api/http_trigger1?code=xxx&name=jack" user-event-pattern="*"  system-event="connected" 

What happen?

Whil I can curl the azure function easily, and see the invocation event.

User's image

But if I send a message via websocket using the tool from azure (https://quicktry.z13.web.core.windows.net/), I received nothing in the log nor the "invocations" page.

User's image

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
79 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.