Layer7 API Management

 View Only
  • 1.  Connect to outbound Websocket assertion

    Posted Sep 14, 2022 10:45 AM
    Hi Team,

    Gateway : 10.1 CR01

    I have requirement to connect to backend websocket as an outbound websocket.

    I have configured Inbound connection policy and outbound connection through "Manage Websocket Connections", and able to send messages to outbound websocket successfully.

    I need to connect to outbound webscoket2 if the webscoket1 is down, is there a way I can connect to using assertion "Connect to outbound Websocket", if yes, how to use that and where to use that?

    Connect to Outbound WebSocket Assertion, this link does not explain clearly how to use it, and I have pasted the statements in the below, I am not sure that what is the meaning of "connection entity that is selected implicitly"

    "The Connect to Outbound WebSocket assertion allows you to establish an outbound WebSocket connection using a specified WebSocket connection entity that is selected implicitly from the policy context. The assertion fails for invalid configurations and unsuccessful connection upgrade."

    Thanks in advance.

    Thanks
    Venkat


  • 2.  RE: Connect to outbound Websocket assertion

    Broadcom Employee
    Posted Sep 19, 2022 10:24 AM

    Hello Venkat,

    You can use the Connect to Outbound WebSocket assertion in your Inbound Connection policy to handle failover like so:

    Reference the ${websocket.server.url} context variable in the WebSocket Connection properties like so:


    Here is how it worked for me: