Kafuka相关文章集合 Kafka-PHP扩展的使用

Kafka 2.0 安装以及使用:html

http://www.tianshouzhi.com/api/tutorials/kafka/117python

kafka实战:react

https://www.cnblogs.com/hei12138/p/7805475.htmlapi

 

Kafka-PHP扩展的使用

使用python链接kafka

 

 

1. 主要功能

根据官网的介绍,ApacheKafka®是一个分布式流媒体平台,它主要有3种功能:app

  1:It lets you publish and subscribe to streams of records.发布和订阅消息流,这个功能相似于消息队列,这也是kafka归类为消息队列框架的缘由框架

  2:It lets you store streams of records in a fault-tolerant way.以容错的方式记录消息流,kafka以文件的方式来存储消息流分布式

  3:It lets you process streams of records as they occur.能够再消息发布的时候进行处理post

2.使用场景

1:Building real-time streaming data pipelines that reliably get data between systems or applications.在系统或应用程序之间构建可靠的用于传输实时数据的管道,消息队列功能ui

2:Building real-time streaming applications that transform or react to the streams of data。构建实时的流数据处理程序来变换或处理数据流,数据处理功能url

 

3.行默认的Kafka

启动Zookeeper server

[root@localhost kafka_2.9.1-0.8.2.2]# sh bin/zookeeper-server-start.sh config/zookeeper.properties &

启动Kafka server

[root@localhost kafka_2.9.1-0.8.2.2]# sh bin/kafka-server-start.sh config/server.properties &

运行生产者producer

[root@localhost kafka_2.9.1-0.8.2.2]# sh bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test

运行消费者consumer

[root@localhost kafka_2.9.1-0.8.2.2]# sh bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
相关文章
相关标签/搜索