All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagehtml/xml
<address uri="https://localhost:9445/store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag" format="rest"/>

Changing the Inbound web socket port

 

With API Manager 2.1.0, you can create and Publish websocket APIs. The default port used for websocket APIs is port 9099. 

If you are using multiple API Manager nodes with port offset in distributed mode, you have to change the inbound.ws.port in  <APIM_HOME>/repository/deployment/server/synapse-configs/default/inbound-endpoints/WebSocketInboundEndpoint.xml  by increment with the same offset that you used in <APIM_HOME>/repository/conf/carbon.xml.

E.g. If your carbon.xml has Offset value 2, WebSocketInboundEndpoint.xml should have  inbound.ws.port  value 9101.

 

Code Block
languagexml
<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse"
                 name="WebSocketInboundEndpoint"
                 sequence="dispatchSeq"
                 onError="fault"
                 protocol="ws"
                 suspend="false">
   <parameters>
      <parameter name="inbound.ws.port">9099</parameter>
      <parameter name="ws.outflow.dispatch.sequence">outDispatchSeq</parameter>
      <parameter name="ws.pipeline.handler.class">org.wso2.carbon.apimgt.gateway.handlers.WebsocketHandler</parameter>
      <parameter name="ws.subprotocol.handler.class">org.wso2.carbon.inbound.endpoint.protocol.websocket.subprotocols.EchoSubprotocolHandler</parameter>
      <parameter name="dispatch.custom.sequence">true</parameter>
      <parameter name="ws.outflow.dispatch.fault.sequence">fault</parameter>
      <parameter name="ws.client.side.broadcast.level">0</parameter>
   </parameters>
</inboundEndpoint>

 

Therefore if you are changing the port offset it is necessary to change the websocket port whether you use websocket APIs or not.

For a list of all default ports opened in WSO2 API Manager, see Default Product Ports.