android - How to implement MQTT for one-to-one message distribution -


i have been researching mqtt , curious how implementation works when trying create one-to-one communication system.

what trying do: set system allows iot device push notifications directly user & user push notifications iot device via mqtt broker.

thoughts on implementation:

  1. all devices have separate topic each user subscribed to.
  2. each device publishes same topic tag identifies user pass message to.

below image created of how see implementation working.

more info: need system can scale include 100k+ devices, extremely low amount of messages(1 message day)

layout:

  • iot device send message via mqtt end system.
  • back-end system receive message , store in end.
  • web-service(dispatcher) layer communicate between back-end , mobile application.
  • mobile application communicate directly iot device via web services.

questions:

  • how mqtt broker implemented regard topics one-to-one communication when large amounts of users anticipated?
  • is there limit on topics?
  • what missing regarding layout?

i think concept of understanding mqtt (pub/sub messaging) incorrect. every client subscribed particular topic gets message. "tag" have mentioned (with tag identifies user pass message to) topic name message has published.

if want special message distribution have create client subscribed topic each client sends message , dispatches message particular “client” topic based on value of “tag”.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

jquery - Javascript click event on a dynamically created button inside a loop -