We are working on integration where we have to consume/receive the events by initiating hybrid connection to Azure relay. we are able to do the successful connection using hyco-ws npm package but we are not receiving any events.
As per hybrid connection protocol, service will send 'accept' notification to the listener to establish new control channel for all subsequent interactions.
From where can we trigger 'accept' notification so listener can receive events from the Azure relay?
We are following Azure Relay Hybrid Connections WebSocket NodeJs to setup the listener.
Are we on right direction to receive the events via hybrid connection?
Any help in the right direction would be greatly appreciated.
In addition to consuming and receiving events, Run the code to send messages since the message sent will be displayed on the listening Output. The message is sent when the listener is active.
hyco-ws
library and sends messages to the Azure Service Bus Relay using a WebSocket connection. Code reference form MSDOCCode:
Output:
Sending message
Listening