Giter Site home page Giter Site logo

avinashmakey / kafka-multithread-java-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from howtoprogram/kafka-multithread-java-example

0.0 1.0 0.0 23 KB

Create Multi-threaded Apache Kafka Consumer

Home Page: http://howtoprogram.xyz/2016/05/29/create-multi-threaded-apache-kafka-consumer/

Batchfile 1.28% Shell 1.20% Java 97.51%

kafka-multithread-java-example's Introduction

"# Kafka-MultiThread-Java-Example"

1. Import source code into Eclipse

Menu File –> Import –> Maven –> Existing Maven Projects

Browse to your source code location

Click Finish button to finish the importing

2. Create the Kafka Topic

Using commands in create-topics.sh (Linux) and create-topics.bat(Windows)

3. Run the example

Model #1. Multiple consumers with their own threads

Open the MultipleConsumersMain.java

Right click -> Run As -> Java Application or use the shortcut: Alt+Shift+x, j to start the main method

Model #2. Single consumer, multiple worker processing threads

Open the SingleConsumerMain.java

Right click -> Run As -> Java Application or use the shortcut: Alt+Shift+x, j to start the main method

All the source code are described in: Create Multi-threaded Apache Kafka Consumer

4. Related Posts

kafka-multithread-java-example's People

Contributors

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