MQTT Broker

MQTT Broker


In order to use MQTT central broker has to be choosen first. All the connection handling, buffering and re-delivery trying (at network interrupts) is managed by MQTT broker. All MQTT clients have a permanently open TCP connection to the broker.

In general, two different alternatives exist:

  1. to use some existing broker service (f.e. cloud broker):
    • easier to start with - all broker set up and maintenance is done by third-party (service provider)
    • more secure to use over Internet (no need to open your network to incoming TCP connections)
  2. to set up and use your own broker:
    • reliability and security is under your control
    • no sign up nor agreements needed with third-parties (service providers)

CDP has a simple MQTT broker component built-in.


To use CDP built-in MQTT broker MQTTBroker subcomponent must be added to CDP application.

MQTTBroker has following configurable properties:

ListenAddressAddress broker listens on (IP or hostname). Use '' to listen on all network interfaces.
ListenPortTCP port broker listens on (recommended values are 1883 for unencrypted and 8883 for encrypted connections)
EncryptionBroker connection encryption. Choose between options:
  • Unencrypted - no encryption
  • TLS - Use TLS certificate based encryption and authentication. See also TLS certificate setup.
  • TLS-PSK - use TLS Pre-Shared Key based encryption and authentication. See also TLS-PSK key setup.
TLSCAFileBroker CA certificate file name for TLS encryption. See also TLS certificate setup.
TLSCertFileClient authentication certificate file name (for TLS client authentication). See also TLS certificate setup.
TLSKeyFileBroker key file name for TLS encryption (PEM certificate or PSK list). See also TLS certificate setup and TLS-PSK key setup

© CDP Technologies AS - All rights reserved