Open jnovack opened 4 years ago
If you're not planning to reuse the client ID, then you just don't need to supply one and allow the broker to generate one for you. If you're using mqtt v5, it'll tell you what it generated in case you want to resume a session.
Had two containers on swarm with the same client id (which MQTT does not like).
https://github.com/jnovack/nut-to-mqtt/blob/f9b9a37eb3ce711561f2f8e1c69f161f45c3dd2e/pkg/mqtt_publisher/mqtt_publisher.go#L46
References: