Mosquitto MQTT Köprüleme Kullanımı ve Ayarları

3604

Mosquitto Broker (sunucu) MQTT köprüsü olacak şekilde çalışabilir.

Bir köprü, iki MQTT brokerini birbirine bağlamanıza izin verir.

Genellikle sistemler arasındaki mesajları paylaşmak için kullanılırlar.

Yaygın bir kullanım, kenar MQTT brokerlerini merkezi veya uzak bir MQTT ağına bağlar.

mosquitto.conf dosyasını açıyoruz

sudo nano /etc/mosquitto/mosquitto.conf 

örnek mosquitto.conf dosyası

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

# connection 

connection bridge-01
address 192.168.1.109:1883
topic # out 0
topic # in 0

connection bridge-02
address 192.168.1.110:1883
topic # out 0
topic # in 0