MQTT: What is the general practice adopted in big scale application?

瀏覽次數:98 次
跳到第一則未讀訊息

manish kumar

未讀,
2016年9月17日 清晨5:49:192016/9/17
收件者:MQTT

Is there any limitation on how many topic can be subscribed by a client ? I am using Paho js & java client. My use case is i want to inform every user about a new comment posted for a post.

I have two solution:

  1. every time a user post a comment subscribe to that post topic
  2. every time a user post a comment, iterate through each user and send message to all user specific topic

which one is will be better for large scale realtime application? What is the general practice adopted in big scale application ?

Dominik Obermaier

未讀,
2016年9月17日 清晨7:26:112016/9/17
收件者:mq...@googlegroups.com、manish kumar
Hi Manish,

in general there is no limit for the number of client subscriptions defined in MQTT. A single SUBSCRIBE message can have as many subscriptions as you want (as long as you don’t exceed the MQTT max payload limit).

Bear mind, that not all brokers handle tens of thousands of subscriptions per client gracefully. We have experience with deployments with multiple tens of thousands of subscriptions per clients with a vast number of MQTT sessions. If you have multiple tens of millions of MQTT subscriptions in the system, you may need a scale-out approach which would require a cluster.

So as long as your broker supports it, I would go with option 1.

Hope this helps,
Dominik
--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

manish kumar

未讀,
2016年9月17日 上午10:42:542016/9/17
收件者:MQTT、mkj.o...@gmail.com
I am using RabbitMQ. So do you have any expeience for using RabbtMQ with 1000's topic subscription/client. Which broker you have tested with 1000's of topic subscription/client??

Dominik Obermaier

未讀,
2016年9月17日 中午12:05:262016/9/17
收件者:mq...@googlegroups.com、manish kumar
Hi Manish,

I don’t have experience with RabbitMQ and huge numbers of subscriptions. The broker we use is our own HiveMQ broker.

You may need to check with your vendor to see if there are limits for MQTT subscriptions.

All the best,
Dominik
回覆所有人
回覆作者
轉寄
0 則新訊息