Do Azure Service Bus Notification Hubs work with websockets and javascript?

妖精的绣舞 提交于 2019-12-05 23:57:01

问题


I am interested in using Azure Service Bus Notification Hubs. However, my first "client" will be a websocket based connection to a ASP.NET MVC site with Knockout. Currently, I'm trying out SignalR to push notification to the clients.

However, it looks like this would be much easier if I could use SB Notification Hubs. All of the examples are Windows or iOS.

Can you use Azure Service Bus Notification Hubs with WebSocket based HTML clients?


回答1:


I am a Program Manager in the Service Bus team. There is no plan to support WebSockets on HTML as an output pipe for Notification Hubs. At the moment your best bet is to use SignalR, which can be scaled out using Service Bus.

What are the characteristics of Notification Hubs that make you say that it would be preferable to SignalR?




回答2:


We spent several days trying to do what you describe, but we were unable to get SignalR/WebSockets to work on Azure Cloud. SignalR/WebSockets failed every time, spawning infinite loops of connection failures/reconnections. We were able to get SignalR/LongPolling (not WebSockets) to work on Azure cloud successfully. We have since learned that the VM on Azure Cloud apparently does not support WebSockets at all. Our experience indicates that you probably will not be able to use WebSocket-based HTML clients with SignalR running on Azure cloud, though you can probably get LongPolling to work OK.




回答3:


Though there is no support right now. This answer may be updated in the future due to these feature requests (Marked as 'Planned' by the way).

You can also add your votes to these to get them pushed faster: https://feedback.azure.com/forums/218849-notification-hubs/suggestions/4621850-add-support-for-azure-notification-hubs-to-push-me

and here:

https://feedback.azure.com/forums/34192--general-feedback/suggestions/32466415-web-socket-support-in-notification-hubs



来源:https://stackoverflow.com/questions/15486176/do-azure-service-bus-notification-hubs-work-with-websockets-and-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!