WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

This tunnel uses Eclipse Paho implementation of MQTT protocol.

Client-side tunnel

<accessor>
  <prototype>NKPClient</prototype>
  <config>
    <passByValue>true</passByValue>
    <tunnel factory="com.ten60.netkernel.nkp.mqtt.MQTTNKPTunnelFactory">
      <url>tcp://localhost:1883</url>
      <topic>nkpTest</topic>
    </tunnel>
  </config>
</accessor>

Supported configuration options are:

  • url - URL of broker
  • topic - base topic for this server. Each distinct server should use it's own topic.
  • connectTimeout - (default: 5000) timeout in millseconds for sending messages to broker (not for receiving responses from server)
  • keepAlive - (default: 5) interval in seconds for sending keep alive messages

Server-side tunnel

<transport>
  <prototype>NKPServer</prototype>
  <config>
    <tunnel factory="com.ten60.netkernel.nkp.mqtt.MQTTNKPTunnelFactory">
      <url>tcp://localhost:1883</url>
      <topic>nkpTest</topic>
    </tunnel>
  </config>
</transport>

Supported configuration options are:

  • url - URL of broker
  • topic - base topic for this server. Each distinct server should use it's own topic.
  • keepAlive - (default: 5) interval in seconds for sending keep alive messages