定义
一千个人眼里有一千个哈姆雷特。如果说谁最有资格定义kafka是什么,那么肯定是官方文档:
Apache Kafka® is a distributed streaming platform.
官方还对流平台进行了定义–流平台有三大关键能力(A streaming platform has three key capabilities):
- Publish and subscribe to streams of records, similar to a message queue or enterprise messaging system.
- Store streams of records in a fault-tolerant durable way.
- Process streams of records as they occur.
第一个特性是类MQ的发布订阅特性,第二个特性就是具备容错的存储能力,第三个特性是处理数据。所以kafka可以替代ActiveMQ这类消息中间件。另外我们看一下官方对kafka的定位,如下图所示:
kafka几个重要的概念:
- Kafka is run as a cluster on one or more servers that can span mu