I have been researching MQTT and I am curious how implementation works when trying to create a one-to-one communication system.
What I am trying to do: Set up a system that allows a IOT device to push notifications directly to its user & the user to push notifications to their IOT device via a MQTT broker.
Thoughts on implementation:
- All devices have a separate topic that each user is subscribed to.
- Each device publishes to the same topic with a tag that identifies the user to pass the message to.
Below is an image I created of how I see the implementation working.
More Info: I need an system that can scale to include 100k+ devices, but extremely low amount of messages(1 message a day)
Layout:
- IOT device will send message via MQTT to the back end system.
- Back-end system will receive the message and store it in the back end.
- Web-service(Dispatcher) layer which will communicate between the back-end and mobile application.
- Mobile application will communicate directly to IOT device via web services.
Questions:
- How is the MQTT Broker implemented with regard to topics for one-to-one communication when large amounts of users are anticipated?
- Is there a limit on topics?
- What am I missing regarding the layout?