- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Config clientID in MQTT broker
Hi,
Is there a place to configure the clientID in the MQTT since my broker only support V3?
It's the -i option in mosquitto_pub CLI https://mosquitto.org/man/mosquitto_pub-1.html :
-i,
--id
The id to use for this client. If not given, a client id will be generated depending on the MQTT version being used. For v3.1.1/v3.1, the client generates a client id in the format mosq-XXXXXXXXXXXXXXXXXX, where the X are replaced with random alphanumeric characters. For v5.0, the client sends a zero length client id, and the server will generate a client id for the client.
Thanks,
cz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
python import paho.mqtt.client as mqtt client = mqtt.Client(client_id="your_custom_clientID")
java import org.eclipse.paho.client.mqttv3.MqttClient; MqttClient client = new MqttClient("tcp://broker.example.com:1883", "your_custom_clientID");
c #include <mosquitto.h> struct mosquitto *mosq = mosquitto_new("your_custom_clientID", true, NULL);
mosquitto_pub -h broker.example.com -t "your/topic" -m "message" -i "your_custom_clientID"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
Sorry I wasn't clear. I was asking if client id can be configured in the Meraki dashboard under "IoT Radio Settings" -> "MQTT broker" > "MQTT telemetry streaming"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, it's not possible to configure. Maybe you should open a support case.
Please, if this post was useful, leave your kudos and mark it as solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thank!
