-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to help business systems perceive whether credentials are online in real time #127
Comments
Hi @baigod! Thank you for reaching out! You can achieve real-time monitoring of device statuses using the TBMQ API. The API allows you to check the online status of a device by querying its client session. Here's an example of how to do this using a curl command:
Replace the HOSTNAME to your actual one and the CLIENT_ID parameter with the actual client ID of the device you want to check. The X-Authorization header should contain a valid JWT token for authentication. In addition, you can choose another API like below:
If you need further assistance or have any questions, feel free to ask! |
Thank you for your reply, but I think I prefer events like Connect Event and Disconnect Event in thingsboard. I can proactively inform the business system through Kafka or HTTP. Based on my estimation, when I have millions of devices connected to TBMQ, if I call through HTTP https://HOSTNAME/api/client-session The interface and timeliness may suffer significant losses. |
Thank you for your feedback. Your approach of subscribing to You can connect to Kafka with a separate process, creating a new consumer group to read from the tbmq.client.session topic. Please be aware of the payload format. We use Protobuf for serialization. You can find the object definition for ClientSessionInfoProto here. I believe you understand the importance of staying up-to-date with the schema definition, which may not be the most convenient option. However, currently, we do not have any other mechanisms to send notifications about the status changes of the devices. |
I am closing this issue due to inactivity. Please feel free to reopen it if you have any more questions. |
Component
Description
We maintain a list of devices in our business system and create unique MQTT credentials for each device, matching them one-to-one with TBMQ credentials. Now, we want our business system to be able to know in real-time whether a device is online. What are the best practices or solutions for interacting with TBMQ to achieve this?
Environment
The text was updated successfully, but these errors were encountered: