개인 정보 보호 정책
데이터 개인 정보 보호 및 보안 계약
Method | Description | Scenario | Difference Comparison |
Active Query | The instance provides a RESTful API for real-time query of the client online status. | 1. During the business process, the subsequent logic needs to be determined based on whether the client is online. 2. During the Ops process, whether a specific client is currently online needs to be determined . | Active query checks the real-time status of the current client, which is more accurate compared with the notification method for login or logout events. |
Client Event | Using message notifications, when client login or logout events are triggered, the MQTT server generates corresponding events and publishes them to the system theme. Business applications can subscribe to related event messages as needed. This method means asynchronous perception of the client status, and what is perceived are login or logout events rather than the online status. Cloud applications need to analyze the client status based on the time sequence of the events. | 1. The business needs to trigger some predefined actions upon client login or logout. 2. The business needs to perform statistical analysis on client login or logout data and push messages based on the client online status. | Clients use message decoupling, making status judgment more complex with a higher likelihood of misjudgment (in terms of final consistency). Although there is certain complexity and probability of misjudgment, it is more suitable for large-scale client status statistics. |
curl --header "Authorization: Basic dXNlcjA6c2VjcmV0MA==" https://${instance-access-point}/client-id/${client-id}/status
Variables | Semantics | Example Value |
${instance-access-point} | The instance access point address, which can be obtained from the Cluster > Basic Info page in the console. | mqtt-xxxx-gz-public.mqtt.tencenttdmq.com |
${client-id} | The target client-id you want to query. For standard definition, see Client Identifier (ClientID). The result needs to be URL encoded. | VIN0000001 |
HTTP Status Code | Description |
200 | The request is successful. |
401 | Authentication failed. The username or password is incorrect. |
403 | Authorization failed. The account lacks CONNECT permission. |
429 | Flow control, with too many requests. |
{"online":true}
Parameter | Description |
online | Client online status. true: Online. false: Offline. |
피드백