MQTT Listener Config: Local Address vs External Address

How Can We Help?

< Back
This article is applicable only when MQTT broker is installed on same server as XMPro IoT.

In MQTT Listener configuration, there is required setting called “Broker Address”. Here you need to specify the IP Address or DNS name of the server where MQTT broker is installed and running. This can be done in two ways:

  1. Using Local Address: 127.0.0.1 (or) localhost
  2. Using External Address: <Server IP> (or) <Server DNS name>

It is recommended to always use local address instead of the external address. Benefits of using local address are:

  1. Faster connection because of low network latency.
  2. Prevents any network or anti-virus related issues.
  3. Prevents any data loss due to potential connection drops between broker and MQTT listener due to network issues. Though MQTT listener is designed to auto-reconnect within 5 seconds, if there are new messages sent to broker during this time, they might not be picked up by the listener.

Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X