Code Monkey home page Code Monkey logo

emq's Introduction

emq(Event Message Queue)

开发文档

入门

示例

# kafka消费示例
php examples/consumer/kafkaConsumer.php


# 创建一个主题
docker exec -i docker_kafka_1 /opt/kafka_2.11-2.0.1/bin/kafka-topics.sh --create --zookeeper 199.199.199.199:2181 --replication-factor 1 --partitions 6 --topic test



# 运行一个消息生产者,指定topic为刚刚创建的主题
docker exec -i docker_kafka_1 /opt/kafka_2.11-2.0.1/bin/kafka-console-producer.sh --broker-list 199.199.199.199:9092 --topic test


docker exec -i docker_kafka_1 /opt/kafka_2.11-2.0.1/bin/kafka-console-producer.sh --broker-list 199.199.199.199:9092 --topic test



{"id" : "20181016150302-0.05498700-182.150.27.74-8760-1","eventKey" : "TEST","data" : {"app_id" : 14,"app_name" : "hdsq","company_id" : 0,"corpid" : "wweace8ae2c27a051f","init_event_name" : 1,"create_uid" : 0,"create_time" : "2018-10-16 15 : 03 : 02"},"time" : 1539673382,"ip" : "182.150.27.74"}

{"id" : "20181016150302-0.05498700-182.150.27.74-8760-1","eventKey" : "TEST_OK","data" : {"app_id" : 14,"app_name" : "hdsq","company_id" : 0,"corpid" : "wweace8ae2c27a051f","init_event_name" : 1,"create_uid" : 0,"create_time" : "2018-10-16 15 : 03 : 02"},"time" : 1539673382,"ip" : "182.150.27.74"}

emq's People

Contributors

qq1060656096 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.