How efficient are topics? Can we use hundreds of them?
I am setting up an MQTT system and am wondering about how efficiently mosquitto will handle many topics. The initial plan is this:
I have about 10 instruments as sources for publication, and a few (1 to 5) as subscribers. The publications can be about 10/sec on each instrument.
Our initial design was to have a small set of topics for each device, and each message be prefaced with a 'command':
Topic: system/<instrument name>/status
Messages:
device.
device.
device.
There would be about 100 or so such message commands in the status topic. There would be a few other topics, each with about 20 or less message commands defined.
We want to change things to control access to particular message command, and the easiest way to do that would be to convert the commands into topics:
Topics:
system/
system/
system/
Then control subscription to each topic. The plus side is that each subscriber can cherry pick the topics to listen to, which can cut down on message transport and make client side coding a bit easier. But this would lead to maybe 200 or so topics per instrument, or 2000+ topics for a single broker. Would this cause efficiency problems with mosquitto?
Thanks for your help.
Steve
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- mosquitto Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Steven Luke
- Solved:
- Last query:
- Last reply: