Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the clientID needed for?

Since specifying the clienID is only a feature in the class MqttAndroidClient, and can not be specified when using classes IMqttClient and IMqttAsynchClient.

what is the real purpose of connecting a client with a unique ID?

like image 253
rmaik Avatar asked Nov 27 '14 15:11

rmaik


People also ask

Why do we need client ID?

The Client ID is a public identifier of your application. The Client Secret is confidential and should only be used to authenticate your application and make requests to LinkedIn's APIs.

What is Clientid OAuth?

The client_id is a public identifier for apps. Even though it's public, it's best that it isn't guessable by third parties, so many implementations use something like a 32-character hex string. If the client ID is guessable, it makes it slightly easier to craft phishing attacks against arbitrary applications.

What is a client secret used for?

A client secret is a secret known only to your application and the authorization server. It protects your resources by only granting tokens to authorized requestors. Protect your client secrets and never include them in mobile or browser-based apps.

What is the difference between user ID and client ID?

As you have seen earlier, the Client ID is stored in a cookie, and therefore only tracks the same user across the same browser and device. On the other hand, the User ID focuses on the user, tracking him or her across a range of devices and browsers.


1 Answers

Every MQTT Connection needs a unique client ID. With this unique client ID the broker can recognize when a client reconnects and can close an old potentially half-open TCP connection for the client. Also, the MQTT broker can hold a persistent session for MQTT clients if they desire to do so (cleanSession=false on CONNECT). If you disconnect and reconnect with the same client ID, you will receive all messages for your subscriptions you may have missed and the broker knows your old subscriptions for that client ID.

like image 71
Dominik Obermaier Avatar answered Oct 18 '22 10:10

Dominik Obermaier