Android hivemq websocket client connection issue

how to use WebSocket transport.in my project we are using hivemq community edition as broker and websocket with 8000 port.i dont got any example or documentation how to use websocket in Android project.

Hi @kalpana,

for this configured websocket listener:

<listeners>   
   <websocket-listener>
      <port>8000</port>
      <bind-address>0.0.0.0</bind-address>
   </websocket-listener>
</listeners>

A client using the websocket:

  final Mqtt5AsyncClient client = Mqtt5Client.builder()
    .serverHost(<<insertHivemqHostAddress>>)
    .serverPort(8000)
    .webSocketConfig(MqttWebSocketConfig.builder()
         .subprotocol("mqtt")
         .serverPath("/mqtt")
         .build())
    .buildAsync();

Greetings,
Michael