DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Java Consumer and Producer Messages Between Kafka Server [Video Tutorials]
  • Understanding Kafka and Event-Driven Architecture [Video Tutorials]
  • Apache Kafka in Java [Video Tutorials]: Architecture and Simple Consumer/Producer
  • Techniques You Should Know as a Kafka Streams Developer

Trending

  • MuleSoft MCP and A2A in Production: What 17 Recipes Reveal
  • DevOps and Platform Engineering Readiness Checklist: Everything Needed for a Scalable, Secure, High-Velocity Delivery Platform
  • Lambda-Driven API Design: Building Composable Node.js Endpoints With Functional Primitives
  • Mastering Fluent Bit: Beginners' Guide for Contributing to our CNCF Project Docs
  1. DZone
  2. Data Engineering
  3. Big Data
  4. Consumer Group in Kafka [Video Tutorials]: Partitions and Consumers

Consumer Group in Kafka [Video Tutorials]: Partitions and Consumers

In this video tutorial series, take a deeper look at the consumer group in Kafka with varying numbers of partitions and consumers.

By 
Ram N user avatar
Ram N
·
Apr. 21, 23 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
6.1K Views

Join the DZone community and get the full member experience.

Join For Free

In this video tutorial series, take a deeper look at the consumer group in Kafka with:

  • 1 partition and 2 consumers
  • 2 partitions and 2 consumers
  • 3 partitions and 1 consumer

Consumer Group in Kafka With 1 Partition and 2 Consumers

In this first Apache Kafka tutorial, learn about Java Kafka consumer code with 1 partition and 2 consumers.

  • Both consumers are registered to the same consumer group.
  • One consumer will be sitting idle.
  • The same partition cannot be assigned to multiple consumers in the same group.

Let's begin!


Consumer Group in Kafka With 2 Partitions and 2 Consumers

The following tutorial explains the Kafka consumer group with 2 partitions and 2 consumers.

  • Both consumers are registered to the same consumer group.
  • The same partition cannot be assigned to multiple consumers in the same group.


Consumer Group in Kafka with 3 Partitions and 1 Consumer

Now let's learn about 3 partitions and 1 consumer within consumer groups in Apache Kafka. 

  • The message will be published to partition randomly.
  • The message will be consumed by "consumer 1" in a round-robin.
  • One consumer can consume messages from more than one partition.


Java (programming language) kafka consumer Partition (database)

Opinions expressed by DZone contributors are their own.

Related

  • Java Consumer and Producer Messages Between Kafka Server [Video Tutorials]
  • Understanding Kafka and Event-Driven Architecture [Video Tutorials]
  • Apache Kafka in Java [Video Tutorials]: Architecture and Simple Consumer/Producer
  • Techniques You Should Know as a Kafka Streams Developer

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook