user3690081
user3690081

Reputation: 215

mosquitto broker to integrate with mongo DB

I am using an eclipse paho client to send mqtt messages to a mosquitto broker. The payload is in JSON format. The broker parses the payload and updates it with some more information and publishes to a subscriber. The subscriber in my case is a BDAS/SPARK instance.

the client, broker and SPARK instance are running in different boxes. in this sequence i want to integrate my mosquitto broker with mongoDB..i tried to do it with nodered but not successful.

Could you point me to some suggestion on this ?

Upvotes: 1

Views: 2620

Answers (1)

Dominik Obermaier
Dominik Obermaier

Reputation: 5770

If mosquitto is not a hard requirement, you could also use a MQTT broker with a plugin system (like HiveMQ) to do this. You can see an example architecture in this blog post.

It should be pretty trivial to write such a plugin for HiveMQ, you only need to implement the OnPublishCallback (see the documentation)

An example where you can start is e.g. This Github Repository.

Upvotes: 3

Related Questions