GithubHelp home page GithubHelp logo

dingyaning / kafka-sample-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bcebigdata/kafka-sample-java

0.0 2.0 0.0 17 KB

百度消息服务Java样例

License: MIT License

Batchfile 1.36% Shell 1.42% Java 97.22%

kafka-sample-java's Introduction

百度消息服务Java样例

百度消息服务是分布式、高可扩展、高通量的托管消息队列服务。完全兼容开源Kafka。本样例展示如何使用Kafka原生客户端访问百度消息服务。

如何运行

运行环境

准备主题和SSL证书

准备工作的细节请参考BCE官网帮助文档

  1. 在管理控制台中创建好主题。
  2. 在管理控制台中下载您的kafka-key.zip,包含Java程序使用的jks证书文件和Kafka客户端配置文件。对C++、Python等Kafka客户端,请使用pem证书文件。
  3. 用上一步的文件替换样例代码中的client.keystore.jksclient.truststore.jks以及src/main/resources/client.properties

运行样例代码

Windows下Maven环境请执行:

run.bat your_topic_name

Linux下Maven环境请执行:

sh run.sh your_topic_name

IDE环境执行的话,需要设置命令行参数your_topic_name

参考链接

kafka-sample-java's People

Contributors

q11g avatar qisamuelzhang avatar wolvever avatar

Watchers

 avatar  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.