Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how is Kafka different from Mosquitto(MQTT) ?

avatar
Contributor

Kafka uses Producer/Consumer concept whime MQTT uses Subscribe/Publish concept ...so How Kafka is different from MQTT ?

Can Kafka handle more works than MQTT with its features ?

1 ACCEPTED SOLUTION

avatar

Hi @Rahul Kumar

Beyond the fact that they are both called "pub sub brokers", Kafka and MQTT has different design goal. Without going deep into details, it's better to see MQTT as a communication protocol between several applications. It was designed to be extremely low light to fit into IoT and resource-constrained environment. For this, the objective is to distribute messages between different system and not to store large volume of data for long time.

At the other hand, Kafka is broker that can store large volume of data and for long time (or for ever). It was designed to be scalable and provide the best performances. Hence, a Kafka cluster usually use beefy machines. It's well suited for Big Data application and has integration with the big data ecosystem (Spark, Storm, Flink, NiFi, etc).

Depending on your application requirements the choice is usually easy to make. In lot of scenarios it's Kafka and MQTT. For IoT for instance, it's not rare to see MQTT at local level (gateway for example) for sensors/actuators communications, and Kafka at regional/center level for data ingestion, processing and storage.

Technically, there are lot of difference too in termes of quality of service, streaming semantics, internal architecture, etc

I hope this helps clarifies your mind.

View solution in original post

2 REPLIES 2

avatar

Hi @Rahul Kumar

Beyond the fact that they are both called "pub sub brokers", Kafka and MQTT has different design goal. Without going deep into details, it's better to see MQTT as a communication protocol between several applications. It was designed to be extremely low light to fit into IoT and resource-constrained environment. For this, the objective is to distribute messages between different system and not to store large volume of data for long time.

At the other hand, Kafka is broker that can store large volume of data and for long time (or for ever). It was designed to be scalable and provide the best performances. Hence, a Kafka cluster usually use beefy machines. It's well suited for Big Data application and has integration with the big data ecosystem (Spark, Storm, Flink, NiFi, etc).

Depending on your application requirements the choice is usually easy to make. In lot of scenarios it's Kafka and MQTT. For IoT for instance, it's not rare to see MQTT at local level (gateway for example) for sensors/actuators communications, and Kafka at regional/center level for data ingestion, processing and storage.

Technically, there are lot of difference too in termes of quality of service, streaming semantics, internal architecture, etc

I hope this helps clarifies your mind.

avatar
Contributor

Thanks @Abdelkrim Hadjidj

I understood the difference

🙂