I have a mqtt client connecting to a broker. My broker intercept connection to get token from it and do some works. I want to send a token as query param when connecting.
my client connect like this:
MqttAsyncClient sampleClient = new MqttAsyncClient(broker, clientId, persistence);
MqttConnectOptions connOpts = new MqttConnectOptions();
connOpts.setCleanSession(false);
connOpts.setAutomaticReconnect(true);
connOpts.setKeepAliveInterval(MqttConnectOptions.KEEP_ALIVE_INTERVAL_DEFAULT);
connOpts.setConnectionTimeout(MqttConnectOptions.CONNECTION_TIMEOUT_DEFAULT);
IMqttToken token = sampleClient.connect(connOpts);
How can I do this? Could someone help me ?