mosca
mosca copied to clipboard
Support cluster
https://github.com/isaacs/cluster-master
could you not just use PM2 instead https://github.com/Unitech/pm2. This has a built-in loadbalancer which uses the node-cluster module.
This is not going to happen, as Mosca requires a database. If it's LevelDB is an embedded one, and it's impossible to use inside cluster. If it's a remote one, then you can just spawn a set of Moscas and connect them to a remote broker.
So, it's not needed.
It seems it will be possible to use LevelDB across multiple clustered instances with https://github.com/substack/level-party/issues/1.
You can launch multiple mosca instances using Redis or Mongo.
No plans at the moment, but if you want to contribute I'll help you.
Thanks for your reply. I use mulitple mosca instances with MongoDB. It works. About cluster. I just think can we use redis or something to implement cluster just like socket.io.
Is it possible to have plugin option in mosca ?
@karthik2883 what do you mean?
I mean custom plugin option (callbacks) . Some Mqtt broker are giving custom plugin option (callbacks) which can be customize to fit the requirement Example
- Authenticate user with database,
- Add or subscribe to default topics
- Save all the publish message into the db ,
- Publish message internally to the relevant topics These are some feature can be handle via plugin.
you can embed Mosca and use its own API to do all the above things