Included for development and edge nodes

  • Name: TMQTTBroker
  • Version: 1.0.2.16
  • Protocol: MQTT flat, MQTT Sparkplug B
  • Interface: TCP/IP
  • Runtime: Multiplatform
  • Configuration:
    • Runtime / Startup


Overview

A first-party MQTT broker included  for development, pilots, and edge nodes, no external broker required.

For large, clustered, or compliance-heavy deployments, use an external broker (e.g., HiveMQ) with our MQTT/Sparkplug connectors.



Connector Configuration

This document has only information about the device connection settings and its address syntax.

For further Information, see:


Running the Broker

The built-in broker is not configured as a Devices channel. It runs as a separate process, TMQTTBroker, which you can start in one of three ways. By default it listens on port 1883.

From the Designer

  1. Open Data Explorer → MQTT Tools.
  2. Click Run Local Built-in Broker.

The message "TMQTTBroker is running" confirms that the broker is active. See MQTT Tools Reference.

From the Installation Folder

Run TMQTTBroker.exe from the fx-10 folder of the FrameworX installation. With the default installation path:

C:\Program Files\Tatsoft\FrameworX\fx-10\TMQTTBroker.exe

By default the broker listens on port 1883. To change the port, edit the configuration file in the MachineSettings folder, not the one in fx-10. See Changing the Broker Port below.

As a Windows Service

To keep the broker running without the Designer open, install it as a Windows service from SolutionCenter, or with TManageServices.exe.

TManageServices.exe is in the root of the FrameworX installation folder, not in fx-10 where TMQTTBroker.exe is. Open a command prompt as Administrator and run, with the default installation path:

cd "C:\Program Files\Tatsoft\FrameworX"
.\TManageServices.exe /installtmqttbroker

If FrameworX is installed in another folder, change the path in the first line. See TManageServices CLI.

Changing the Broker Port

The broker listens on port 1883 by default. Only one program can listen on a port on the same computer, so if another application already uses port 1883, such as another MQTT broker or a VPN service, the broker cannot open it and the MQTT channels that connect to localhost:1883 fail with "Error while connecting with host 'localhost:1883'".

Check Which Process Uses the Port

Open a command prompt and run:

netstat -ano | findstr :1883

The last number on each line is the process ID (PID) of the program using the port. To see the name of that program, run the command below, replacing <PID> with the number found in the previous command:

tasklist /FI "PID eq <PID>"

If the program shown is TMQTTBroker.exe, the broker is running on that port. If it is another program, either stop that program or move the broker to another port as described below.

Set a Different Port

  1. Stop the broker.
  2. Open the broker configuration file in the MachineSettings folder. With a default FrameworX 10.1.5 installation, the full path is:

    C:\Users\Public\Documents\FrameworX_10.1.5\MachineSettings\TMQTTBroker.config.xml
  3. Change the ListeningPort value to the new port, for example <ListeningPort>1884</ListeningPort>, and save the file.
  4. Start the broker again and confirm that it is listening on the new port:

    netstat -ano | findstr :1884
  5. In Devices → Nodes, set the same port in the PrimaryStation of each MQTT node that connects to the local broker.

In this section...