server icon indicating copy to clipboard operation
server copied to clipboard

Make GOST MQTT prefix configurable

Open bertt opened this issue 6 years ago • 1 comments

Make GOST MQTT prefix configurable, in config file and environmental variabele

bertt avatar Mar 13 '18 09:03 bertt

Prefix is now configurable in config.yaml (mqtt/prefix) or by using the environment variable GOST_MQTT_PREFIX.

As requested in https://github.com/gost/server/issues/136 It is now possible to setup multiple GOST servers and connect to 1 broker. Do keep in mind that processed messages will be published from GOST to the broker without a prefix.

Sensor1 -> MQTT Publish on GOST1/Datastreams(1)/Observations -> picked up by GOST server 1 Sensor2 -> MQTT Publish on GOST2/Datastreams(1)/Observations -> picked up by GOST server 2

will output 2 messages over topic Datastreams(1)/Observations

Also use different client id's when connecting to the same broker, this can be set from config.yaml (mqtt/clientId) or using the environment variable GOST_MQTT_CLIENTID

@bertt Maybe it's an idea to also add an optional prefix for outgoing topics?

tebben avatar Mar 21 '18 13:03 tebben