Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

supriyashejale/Kafka-MultiThread-Java-Example

Open more actions menu
 
 

Repository files navigation

"# 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

About

Create Multi-threaded Apache Kafka Consumer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 97.5%
  • Batchfile 1.3%
  • Shell 1.2%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.