An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
PubSub is the Microsoft support for azure functions using web sockets. Your other option is to use a web app service rather than azure functions. a simple asp.net core min api is a good replacement for an azure function.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-8.0