absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.46k stars 669 forks source link

Add Kafka writer #990

Open drasko opened 4 years ago

drasko commented 4 years ago

FEATURE REQUEST

  1. Is there an open issue addressing this request? If it does, please add a "+1" reaction to the existing issue, otherwise proceed to step 2.

  2. Describe the feature you are requesting, as well as the possible use case(s) for it.

May Mainflux users have already legacy systems (apps) running on an enterprise bus which is often Kafka.

It would be high effort for them to switch to NATS, i.e. change their legacy apps to subscribe to NATS provided by Mainflux, or use Mainflux API to fetch the data.

For this purpose we can provide a NATS -> Kafka adapter/writer. It would be a small piece of software, very similar to existing writers (just that it will not write in some DB, but Kafka). It would just bluntly take messages from NATS and throw them into Kafka.

  1. Indicate the importance of this feature to you (must-have, should-have, nice-to-have). Must-have
jruizaranguren commented 4 years ago

https://github.com/nats-io/nats-kafka??

drasko commented 4 years ago

Makes sense, but I think:

drasko commented 4 years ago

This can be easily done through mProxy. Closing here, as this will not be main focus of the Core.

dborovcanin commented 4 years ago

An example implementation can be found here: https://github.com/dusanb94/mainflux/tree/mproxy-kafka/mqtt/mproxy/kafka

dborovcanin commented 3 years ago

The idea is to generalize the approach from this example using a custom writer (with a custom publisher), rather than creating only a custom publisher and coupling it with the MQTT adapter.