Closed a244096658 closed 7 years ago
Yes, the Mosquitto is similar to mosquitto's one. You can back one mosquitto with another.
It is not very much useful in practice for Mosca, use MongoDB or Redis.
I still have the following questions, hope can get help from you:
I now use Mosquitto as backend for Mosca, and my Mosquitto can receive the published data. Does it mean Mosquitto will overwrite Mosca that all the sub/pub message are processed through Mosquitto?
It is not very much useful in practice for Mosca, use MongoDB or Redis.
So it is more practical to use MongoDB or Redis instead of using Mosquitto? And reason to use MongoDB as backend is to store published data?
Thanks in advance!!
Can you please rephrase the question 1? I don't understand.
You should use Redis (preferred) or MongoDB.
For question 1, I mean: Does Mosca just perform as a container when I use Mosquitto as a backend? So that Mosquitto will carry all the mqtt service.
Thanks for your response.
Yes, but the offline messages will still be stored in mosca (redis or mongodb persistence).
I include Mosquitto in Mosca. But the pub/sub messaging still works fine even without adding Mosquitto to the backend.
So I am wondering what is the reason and benefit to use Mosquitto as a backend for Mosca? I went through the wiki tutorials and knew that using MongoDB is for offline/retain message purpose. But I still do not understand the logic to use another broker e.g: Mosquitto inside Mosca. Can Mosca perform as a broker itself?
My code to use Mosquitto is here: