kafka 介绍

一:kafka 是什么?
官网定义:Apache Kafka® is  a distributed streaming platform
翻译:kafka 是一个分布式的流媒体平台

二:流媒体平台( a streaming platform)有三个关键功能 :
2.1 可以发布或者订阅流消息(类似于消息队列或者企业消息系统)(It lets you publish and subscribe to streams of records. In this respect it is similar to a message queue or enterprise messaging system.)
2.2 以容错的方式存储流消息(It lets you store streams of records in a fault-tolerant way)
2.3 只要消息流存在让可以处理(It lets you process streams of records as they occur)

三:kafka 的用途:
What is Kafka good for?
It gets used for two broad classes of application:
Building real-time streaming data pipelines that reliably get data between systems or applications
Building real-time streaming applications that transform or react to the streams of data
主要体现在两方面:
3.1 构建一个安全可靠在系统应用之间获取数据的实时流数据管道
3.2 构建一个对数据流进行转换或响应的实时流应用

四:kafka 的一些概念:
4.1 支持集群部署( Kafka is run as a cluster on one or more servers.
4.2 kafka 集群存储的流消息在一个类别中,被称之为主题( The Kafka cluster stores streams of  records  in categories called  topics .
4.3 每条消息中包含一个key,一个value和一个时间戳( Each record consists of a key, a value, and a timestamp)

五:kafka 有4个基础接口:


它主要提供将流消息发布给一个或者多个kafka 主题
5.1 提供者API
5.2 消费者API
它主要提供对一个或者多个主题的消息进行订阅(监听)处理
5.3 流API
主要用于接收到一个或者多个主题的信息流,可以加工,最后再以消息流的形式 发布(转发)给一个或者主题

5.4 连接API
主要用于提供给构建或可持续运行的消费者或提供者应用去连接存在于kafka中存在的主题

猜你喜欢

转载自blog.csdn.net/u012149894/article/details/79296948