SlideShare a Scribd company logo
Himani Arora
Software Consultant
Knoldus Software LLP
Satendra Kumar
Sr. Software Consultant
Knoldus Software LLP
Introduction to Apache Kafka-02
Topics Covered
➢ Consumer group
➢ Consumer Failure
➢ Guarantees
➢ Consumer/Producer API
➢ Demo
➢ Kafka @ Knoldus
Consumer group
● Messaging traditionally has two models: queuing and publish-
subscribe.
Queuing
Queuing
Queuing
Publish-Subscribe
Consumer group
● Messaging traditionally has two models: queuing and publish-
subscribe.
● Kafka offers a single consumer abstraction that generalizes both
of these—the consumer group.
Consumer group
● Messaging traditionally has two models: queuing and publish-
subscribe.
● Kafka offers a single consumer abstraction that generalizes both
of these—the consumer group.
● If all the consumer instances have the same consumer group,
then this works just like a traditional queue balancing load over
the consumers.
Consumer group
● Messaging traditionally has two models: queuing and publish-
subscribe.
● Kafka offers a single consumer abstraction that generalizes both of
these—the consumer group.
● If all the consumer instances have the same consumer group, then
this works just like a traditional queue balancing load over the
consumers.
● If all the consumer instances have different consumer groups, then
this works like publish-subscribe and all messages are broadcast to
all consumers.
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
Guarantees
➢ Messages sent by a producer to a particular topic partition will be
appended in the order they are sent. That is, if a message M1 is sent by
the same producer as a message M2, and M1 is sent first, then M1 will
have a lower offset than M2 and appear earlier in the log.
➢ A consumer instance sees messages in the order they are stored in the
log.
At a high-level Kafka gives the following guarantees:
Guarantees
➢ Messages sent by a producer to a particular topic partition will be
appended in the order they are sent. That is, if a message M1 is sent by
the same producer as a message M2, and M1 is sent first, then M1 will
have a lower offset than M2 and appear earlier in the log.
➢ A consumer instance sees messages in the order they are stored in the
log.
➢ For a topic with replication factor N, we will tolerate up to N-1 server
failures without losing any messages committed to the log.
At a high-level Kafka gives the following guarantees:
Producer Scala API
import java.util.{Properties, UUID}
import kafka.message.DefaultCompressionCodec
import kafka.producer.{KeyedMessage, Producer, ProducerConfig}
class KafkaProducer(brokerList: String) {
private val props = new Properties()
props.put("compression.codec", DefaultCompressionCodec.codec.toString)
props.put("producer.type", "sync")
props.put("metadata.broker.list", brokerList)
props.put("message.send.max.retries", "5")
props.put("request.required.acks", "-1")
props.put("serializer.class", "kafka.serializer.StringEncoder")
props.put("client.id", UUID.randomUUID().toString())
private val producer = new Producer[String, String](new ProducerConfig(props))
def send(topic: String, messages: Seq[String]): Unit =
try {
println("sending batch messages to kafka queue.......")
val queueMessages = messages.map { message => new KeyedMessage[String, String](topic, message) }
producer.send(queueMessages: _*)
} catch {
case ex: Exception =>
ex.printStackTrace()
}
}
Async Producer Scala API
import java.util.{Properties, UUID}
import kafka.message.DefaultCompressionCodec
import kafka.producer.{KeyedMessage, Producer, ProducerConfig}
class KafkaProducer(brokerList: String) {
private val props = new Properties()
props.put("compression.codec", DefaultCompressionCodec.codec.toString)
props.put("producer.type", "async")
props.put("metadata.broker.list", brokerList)
props.put("batch.num.messages", "200")
props.put("message.send.max.retries", "5")
props.put("serializer.class", "kafka.serializer.StringEncoder")
props.put("client.id", UUID.randomUUID().toString())
private val producer = new Producer[String, String](new ProducerConfig(props))
def send(topic: String, messages: Seq[String]): Unit =
try {
println("sending batch messages to kafka queue.......")
val queueMessages = messages.map { message => new KeyedMessage[String, String](topic, message) }
producer.send(queueMessages: _*)
} catch {
case ex: Exception =>
ex.printStackTrace()
}
}
Producer Java API
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.apache.kafka.common.serialization.StringSerializer;
import org.apache.kafka.clients.producer.KafkaProducer;
import java.util.Properties;
import java.util.concurrent.Future;
public class Producer {
private final KafkaProducer<String, String> producer;
public Producer(String servers) {
Properties props = new Properties();
props.put("bootstrap.servers", servers);
props.put("acks", "all");
props.put("retries", 5);
props.put("key.serializer", StringSerializer.class.getName());
props.put("value.serializer", StringSerializer.class.getName());
producer = new KafkaProducer<String, String>(props);
}
public Future<RecordMetadata> send(String topic, String record) {
return producer.send(new ProducerRecord<String, String>(topic, record, record));
}
}
Producer With Callback Java API
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.apache.kafka.common.serialization.StringSerializer;
import org.apache.kafka.clients.producer.*;
import java.util.Properties;
import java.util.concurrent.Future;
public class Producer {
private final KafkaProducer<String, String> producer;
public Producer(String servers) {
Properties props = new Properties();
props.put("bootstrap.servers", servers);
props.put("acks", "all");
props.put("retries", 5);
props.put("key.serializer", StringSerializer.class.getName());
props.put("value.serializer", StringSerializer.class.getName());
producer = new KafkaProducer<String, String>(props);
}
public Future<RecordMetadata> send(String topic, String record) {
ProducerRecord<String, String> message = new ProducerRecord(topic, record, record);
return producer.send(message, new CallbackHandler());
}
}
class CallbackHandler implements Callback {
public void onCompletion(RecordMetadata metadata, Exception e) {
if(e != null)
e.printStackTrace();
System.out.println("The offset of the record we just sent is: " + metadata.offset());
}
}
Producer Throughput
On a Single producer thread, no replication
● Date 78.3 MB/sec
● Messages: 821,557 records/sec
Single producer thread, 3x asynchronous replication
● Data: 75.1 MB/sec
● Messages: 786,980 records/sec
Single producer thread, 3x synchronous replication
● Data: 40.2 MB/sec
● Messages: 421,823 records/sec
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Producer Throughput Versus Stored Data
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Producer Throughput Versus Stored Data
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Kafka always persists messages the performance is O(1)
with respect to unconsumed data volume
Consumer Scala API
class KafkaConsumer(topic: String, groupId: String, zookeeperConnect: String) {
private val props = new Properties()
props.put("group.id", groupId)
props.put("zookeeper.connect", zookeeperConnect)
props.put("auto.offset.reset", "smallest")
props.put("consumer.timeout.ms", "500")
props.put("auto.commit.interval.ms", "500")
private val config = new ConsumerConfig(props)
private val connector = Consumer.create(config)
private val filterSpec = new Whitelist(topic)
val numStreamsPerTopic=1
val keyDecoder=new DefaultDecoder()
val valueDecoder=new DefaultDecoder()
val streams = connector.createMessageStreamsByFilter(filterSpec, numStreamsPerTopic, keyDecoder, valueDecoder)(0)
lazy val iterator = streams.iterator()
def read():Option[String] = try {
if (hasNext) {
println("Getting message from queue.............")
val message = iterator.next().message()
Some(new String(message))
} else {
None
}
} catch {
case ex: Throwable => None
}
private def hasNext(): Boolean =try{
iterator.hasNext()
}catch {
case timeOutEx: ConsumerTimeoutException => false
}
}
Consumer Java APIpublic class Consumer {
private final KafkaConsumer<String, String> consumer;
private final List<String> topics;
private final int id;
private final long timeout=10000;
public Consumer(int id, String groupId, String servers, List<String> topics) {
this.id = id;
this.topics = topics;
Properties props = new Properties();
props.put("bootstrap.servers", servers);
props.put("group.id", groupId);
props.put("key.deserializer", StringDeserializer.class.getName());
props.put("value.deserializer", StringDeserializer.class.getName());
consumer = new KafkaConsumer(props);
consumer.subscribe(topics);
}
public List<String> read() {
try {
ConsumerRecords<String, String> consumerRecords = consumer.poll(timeout);
List<String> records = new ArrayList();
consumerRecords.forEach( record -> records.add(record.value()));
return records;
} catch (WakeupException e) {
e.printStackTrace();
return Arrays.asList();
} finally {
consumer.close();
}
}
}
Consumer Throughput
Single Consumer:
● Data: 89.7 MB/sec
● Messages: 940,521 records/sec
Three Consumers:
● Data: 249.5 MB/sec
● Messages: 2,615,968 records/sec
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Producer and Consumer Throughput
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
One producer with 3x async replication and one consumer:
Data: 75.8 MB/sec
Messages: 795,064 records/sec
Effect of Message Size
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Effect of Message Size
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
Kafka @ Knoldus
Kafka @ Knoldus
References
● http://kafka.apache.org/documentation.html
● https://engineering.linkedin.com/kafka/benchmarking-apache-k
● http://www.confluent.io/blog/tutorial-getting-started-with-the-new
● http://kafka-summit.org
Question & Option[Answer]
Github Code URL
● https://github.com/knoldus/activator-kafka-scala-pro
● https://github.com/knoldus/activator-kafka-java-prod
Thanks
Presenters:
@_himaniarora
@_satendrakumar
Organizer:
@knolspeak
http://www.knoldus.com
Ad

Recommended

Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
StreamNative
 
Akka Actor presentation
Akka Actor presentation
Gene Chang
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
Konstantin Tsykulenko
 
Building Distributed Systems in Scala
Building Distributed Systems in Scala
Alex Payne
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
mircodotta
 
Scala at Netflix
Scala at Netflix
Manish Pandit
 
Designing Scalable and Extendable Data Pipeline for Call Of Duty Games
Designing Scalable and Extendable Data Pipeline for Call Of Duty Games
Yaroslav Tkachenko
 
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
mircodotta
 
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Gal Marder
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"
Markus Jura
 
Dive into spark2
Dive into spark2
Gal Marder
 
Slick eventsourcing
Slick eventsourcing
Adam Warski
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
Streamlio
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
Gal Marder
 
TGIPulsar - EP #006: Lifecycle of a Pulsar message
TGIPulsar - EP #006: Lifecycle of a Pulsar message
StreamNative
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
💡 Tomasz Kogut
 
High Performance RPC with Finagle
High Performance RPC with Finagle
Samir Bessalah
 
Spark real world use cases and optimizations
Spark real world use cases and optimizations
Gal Marder
 
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Jiayun Zhou
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performance
Steven Shim
 
What’s expected in Java 9
What’s expected in Java 9
Gal Marder
 
Google App Engine With Java And Groovy
Google App Engine With Java And Groovy
Ken Kousen
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
Joe Stein
 
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
wallyqs
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
Apache ZooKeeper
Apache ZooKeeper
Scott Leberknight
 
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Lightbend
 
Logging in Scala
Logging in Scala
John Nestor
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
Knoldus Inc.
 
Introduction to Kafka connect
Introduction to Kafka connect
Knoldus Inc.
 

More Related Content

What's hot (20)

Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Gal Marder
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"
Markus Jura
 
Dive into spark2
Dive into spark2
Gal Marder
 
Slick eventsourcing
Slick eventsourcing
Adam Warski
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
Streamlio
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
Gal Marder
 
TGIPulsar - EP #006: Lifecycle of a Pulsar message
TGIPulsar - EP #006: Lifecycle of a Pulsar message
StreamNative
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
💡 Tomasz Kogut
 
High Performance RPC with Finagle
High Performance RPC with Finagle
Samir Bessalah
 
Spark real world use cases and optimizations
Spark real world use cases and optimizations
Gal Marder
 
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Jiayun Zhou
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performance
Steven Shim
 
What’s expected in Java 9
What’s expected in Java 9
Gal Marder
 
Google App Engine With Java And Groovy
Google App Engine With Java And Groovy
Ken Kousen
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
Joe Stein
 
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
wallyqs
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
Apache ZooKeeper
Apache ZooKeeper
Scott Leberknight
 
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Lightbend
 
Logging in Scala
Logging in Scala
John Nestor
 
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Gal Marder
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"
Markus Jura
 
Dive into spark2
Dive into spark2
Gal Marder
 
Slick eventsourcing
Slick eventsourcing
Adam Warski
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
Streamlio
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
Gal Marder
 
TGIPulsar - EP #006: Lifecycle of a Pulsar message
TGIPulsar - EP #006: Lifecycle of a Pulsar message
StreamNative
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
💡 Tomasz Kogut
 
High Performance RPC with Finagle
High Performance RPC with Finagle
Samir Bessalah
 
Spark real world use cases and optimizations
Spark real world use cases and optimizations
Gal Marder
 
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Jiayun Zhou
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performance
Steven Shim
 
What’s expected in Java 9
What’s expected in Java 9
Gal Marder
 
Google App Engine With Java And Groovy
Google App Engine With Java And Groovy
Ken Kousen
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
Joe Stein
 
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
wallyqs
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Lightbend
 
Logging in Scala
Logging in Scala
John Nestor
 

Viewers also liked (20)

Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
Knoldus Inc.
 
Introduction to Kafka connect
Introduction to Kafka connect
Knoldus Inc.
 
A Step to programming with Apache Spark
A Step to programming with Apache Spark
Knoldus Inc.
 
Data Pipelines with Kafka Connect
Data Pipelines with Kafka Connect
Kaufman Ng
 
Meet Up - Spark Stream Processing + Kafka
Meet Up - Spark Stream Processing + Kafka
Knoldus Inc.
 
Introduction to Apache Kafka
Introduction to Apache Kafka
Jeff Holoman
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
Rahul Jain
 
Getting Started With AureliaJs
Getting Started With AureliaJs
Knoldus Inc.
 
Effective way to code in Scala
Effective way to code in Scala
Knoldus Inc.
 
BDD with Cucumber
BDD with Cucumber
Knoldus Inc.
 
I Heart Log: Real-time Data and Apache Kafka
I Heart Log: Real-time Data and Apache Kafka
Jay Kreps
 
Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0
Knoldus Inc.
 
Introduction to Structured Streaming
Introduction to Structured Streaming
Knoldus Inc.
 
Introducing Kafka Streams, the new stream processing library of Apache Kafka,...
Introducing Kafka Streams, the new stream processing library of Apache Kafka,...
Michael Noll
 
The State of Frontend
The State of Frontend
Jimit Shah
 
Share and analyze geonomic data at scale by Andy Petrella and Xavier Tordoir
Share and analyze geonomic data at scale by Andy Petrella and Xavier Tordoir
Spark Summit
 
Drilling the Async Library
Drilling the Async Library
Knoldus Inc.
 
Introduction to Scala JS
Introduction to Scala JS
Knoldus Inc.
 
Akka streams
Akka streams
Knoldus Inc.
 
Realm Mobile Database - An Introduction
Realm Mobile Database - An Introduction
Knoldus Inc.
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
Knoldus Inc.
 
Introduction to Kafka connect
Introduction to Kafka connect
Knoldus Inc.
 
A Step to programming with Apache Spark
A Step to programming with Apache Spark
Knoldus Inc.
 
Data Pipelines with Kafka Connect
Data Pipelines with Kafka Connect
Kaufman Ng
 
Meet Up - Spark Stream Processing + Kafka
Meet Up - Spark Stream Processing + Kafka
Knoldus Inc.
 
Introduction to Apache Kafka
Introduction to Apache Kafka
Jeff Holoman
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
Rahul Jain
 
Getting Started With AureliaJs
Getting Started With AureliaJs
Knoldus Inc.
 
Effective way to code in Scala
Effective way to code in Scala
Knoldus Inc.
 
I Heart Log: Real-time Data and Apache Kafka
I Heart Log: Real-time Data and Apache Kafka
Jay Kreps
 
Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0
Knoldus Inc.
 
Introduction to Structured Streaming
Introduction to Structured Streaming
Knoldus Inc.
 
Introducing Kafka Streams, the new stream processing library of Apache Kafka,...
Introducing Kafka Streams, the new stream processing library of Apache Kafka,...
Michael Noll
 
The State of Frontend
The State of Frontend
Jimit Shah
 
Share and analyze geonomic data at scale by Andy Petrella and Xavier Tordoir
Share and analyze geonomic data at scale by Andy Petrella and Xavier Tordoir
Spark Summit
 
Drilling the Async Library
Drilling the Async Library
Knoldus Inc.
 
Introduction to Scala JS
Introduction to Scala JS
Knoldus Inc.
 
Realm Mobile Database - An Introduction
Realm Mobile Database - An Introduction
Knoldus Inc.
 
Ad

Similar to Introduction to Apache Kafka- Part 2 (20)

KAFKA Quickstart
KAFKA Quickstart
Vikram Singh Chandel
 
Apache Kafka - Scalable Message Processing and more!
Apache Kafka - Scalable Message Processing and more!
Guido Schmutz
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
Joe Kutner
 
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
confluent
 
Apache Kafka Women Who Code Meetup
Apache Kafka Women Who Code Meetup
Snehal Nagmote
 
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Guido Schmutz
 
Apache kafka
Apache kafka
Srikrishna k
 
Apache kafka
Apache kafka
Ramakrishna kapa
 
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Microsoft Tech Community
 
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
HostedbyConfluent
 
Kafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around Kafka
Guido Schmutz
 
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Timothy Spann
 
Quick introduction to Kafka @ Codeurs en Seine meetups
Quick introduction to Kafka @ Codeurs en Seine meetups
Florian Inchingolo
 
Kafka overview
Kafka overview
Shanki Singh Gandhi
 
Introduction to Kafka
Introduction to Kafka
Alexandros Mavrommatis
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
Guido Schmutz
 
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
HostedbyConfluent
 
Introduction to apache kafka
Introduction to apache kafka
Dimitris Kontokostas
 
Containerizing Distributed Pipes
Containerizing Distributed Pipes
inside-BigData.com
 
Princeton Dec 2022 Meetup_ StreamNative and Cloudera Streaming
Princeton Dec 2022 Meetup_ StreamNative and Cloudera Streaming
Timothy Spann
 
Apache Kafka - Scalable Message Processing and more!
Apache Kafka - Scalable Message Processing and more!
Guido Schmutz
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
Joe Kutner
 
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
confluent
 
Apache Kafka Women Who Code Meetup
Apache Kafka Women Who Code Meetup
Snehal Nagmote
 
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Kafka Connect & Kafka Streams/KSQL - the ecosystem around Kafka
Guido Schmutz
 
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Microsoft Tech Community
 
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
HostedbyConfluent
 
Kafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around Kafka
Guido Schmutz
 
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Timothy Spann
 
Quick introduction to Kafka @ Codeurs en Seine meetups
Quick introduction to Kafka @ Codeurs en Seine meetups
Florian Inchingolo
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
Guido Schmutz
 
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
HostedbyConfluent
 
Containerizing Distributed Pipes
Containerizing Distributed Pipes
inside-BigData.com
 
Princeton Dec 2022 Meetup_ StreamNative and Cloudera Streaming
Princeton Dec 2022 Meetup_ StreamNative and Cloudera Streaming
Timothy Spann
 
Ad

More from Knoldus Inc. (20)

Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
 
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Knoldus Inc.
 
Self-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - Healenium
Knoldus Inc.
 
Kanban Metrics Presentation (Project Management)
Kanban Metrics Presentation (Project Management)
Knoldus Inc.
 
Java 17 features and implementation.pptx
Java 17 features and implementation.pptx
Knoldus Inc.
 
Chaos Mesh Introducing Chaos in Kubernetes
Chaos Mesh Introducing Chaos in Kubernetes
Knoldus Inc.
 
GraalVM - A Step Ahead of JVM Presentation
GraalVM - A Step Ahead of JVM Presentation
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
DAPR - Distributed Application Runtime Presentation
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
Introduction to Azure Virtual WAN Presentation
Introduction to Azure Virtual WAN Presentation
Knoldus Inc.
 
Introduction to Argo Rollouts Presentation
Introduction to Argo Rollouts Presentation
Knoldus Inc.
 
Intro to Azure Container App Presentation
Intro to Azure Container App Presentation
Knoldus Inc.
 
Insights Unveiled Test Reporting and Observability Excellence
Insights Unveiled Test Reporting and Observability Excellence
Knoldus Inc.
 
Introduction to Splunk Presentation (DevOps)
Introduction to Splunk Presentation (DevOps)
Knoldus Inc.
 
Code Camp - Data Profiling and Quality Analysis Framework
Code Camp - Data Profiling and Quality Analysis Framework
Knoldus Inc.
 
AWS: Messaging Services in AWS Presentation
AWS: Messaging Services in AWS Presentation
Knoldus Inc.
 
Amazon Cognito: A Primer on Authentication and Authorization
Amazon Cognito: A Primer on Authentication and Authorization
Knoldus Inc.
 
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Knoldus Inc.
 
Managing State & HTTP Requests In Ionic.
Managing State & HTTP Requests In Ionic.
Knoldus Inc.
 
Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
 
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Knoldus Inc.
 
Self-Healing Test Automation Framework - Healenium
Self-Healing Test Automation Framework - Healenium
Knoldus Inc.
 
Kanban Metrics Presentation (Project Management)
Kanban Metrics Presentation (Project Management)
Knoldus Inc.
 
Java 17 features and implementation.pptx
Java 17 features and implementation.pptx
Knoldus Inc.
 
Chaos Mesh Introducing Chaos in Kubernetes
Chaos Mesh Introducing Chaos in Kubernetes
Knoldus Inc.
 
GraalVM - A Step Ahead of JVM Presentation
GraalVM - A Step Ahead of JVM Presentation
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
Knoldus Inc.
 
DAPR - Distributed Application Runtime Presentation
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
Introduction to Azure Virtual WAN Presentation
Introduction to Azure Virtual WAN Presentation
Knoldus Inc.
 
Introduction to Argo Rollouts Presentation
Introduction to Argo Rollouts Presentation
Knoldus Inc.
 
Intro to Azure Container App Presentation
Intro to Azure Container App Presentation
Knoldus Inc.
 
Insights Unveiled Test Reporting and Observability Excellence
Insights Unveiled Test Reporting and Observability Excellence
Knoldus Inc.
 
Introduction to Splunk Presentation (DevOps)
Introduction to Splunk Presentation (DevOps)
Knoldus Inc.
 
Code Camp - Data Profiling and Quality Analysis Framework
Code Camp - Data Profiling and Quality Analysis Framework
Knoldus Inc.
 
AWS: Messaging Services in AWS Presentation
AWS: Messaging Services in AWS Presentation
Knoldus Inc.
 
Amazon Cognito: A Primer on Authentication and Authorization
Amazon Cognito: A Primer on Authentication and Authorization
Knoldus Inc.
 
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Knoldus Inc.
 
Managing State & HTTP Requests In Ionic.
Managing State & HTTP Requests In Ionic.
Knoldus Inc.
 

Recently uploaded (20)

SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
joybepari360
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
What is data visualization and how data visualization tool can help.pptx
What is data visualization and how data visualization tool can help.pptx
Varsha Nayak
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
certivoai
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
Smadav Pro 2025 Rev 15.4 Crack Full Version With Registration Key
joybepari360
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
What is data visualization and how data visualization tool can help.pptx
What is data visualization and how data visualization tool can help.pptx
Varsha Nayak
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
certivoai
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 

Introduction to Apache Kafka- Part 2

  • 1. Himani Arora Software Consultant Knoldus Software LLP Satendra Kumar Sr. Software Consultant Knoldus Software LLP Introduction to Apache Kafka-02
  • 2. Topics Covered ➢ Consumer group ➢ Consumer Failure ➢ Guarantees ➢ Consumer/Producer API ➢ Demo ➢ Kafka @ Knoldus
  • 3. Consumer group ● Messaging traditionally has two models: queuing and publish- subscribe.
  • 8. Consumer group ● Messaging traditionally has two models: queuing and publish- subscribe. ● Kafka offers a single consumer abstraction that generalizes both of these—the consumer group.
  • 9. Consumer group ● Messaging traditionally has two models: queuing and publish- subscribe. ● Kafka offers a single consumer abstraction that generalizes both of these—the consumer group. ● If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers.
  • 10. Consumer group ● Messaging traditionally has two models: queuing and publish- subscribe. ● Kafka offers a single consumer abstraction that generalizes both of these—the consumer group. ● If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers. ● If all the consumer instances have different consumer groups, then this works like publish-subscribe and all messages are broadcast to all consumers.
  • 19. Guarantees ➢ Messages sent by a producer to a particular topic partition will be appended in the order they are sent. That is, if a message M1 is sent by the same producer as a message M2, and M1 is sent first, then M1 will have a lower offset than M2 and appear earlier in the log. ➢ A consumer instance sees messages in the order they are stored in the log. At a high-level Kafka gives the following guarantees:
  • 20. Guarantees ➢ Messages sent by a producer to a particular topic partition will be appended in the order they are sent. That is, if a message M1 is sent by the same producer as a message M2, and M1 is sent first, then M1 will have a lower offset than M2 and appear earlier in the log. ➢ A consumer instance sees messages in the order they are stored in the log. ➢ For a topic with replication factor N, we will tolerate up to N-1 server failures without losing any messages committed to the log. At a high-level Kafka gives the following guarantees:
  • 21. Producer Scala API import java.util.{Properties, UUID} import kafka.message.DefaultCompressionCodec import kafka.producer.{KeyedMessage, Producer, ProducerConfig} class KafkaProducer(brokerList: String) { private val props = new Properties() props.put("compression.codec", DefaultCompressionCodec.codec.toString) props.put("producer.type", "sync") props.put("metadata.broker.list", brokerList) props.put("message.send.max.retries", "5") props.put("request.required.acks", "-1") props.put("serializer.class", "kafka.serializer.StringEncoder") props.put("client.id", UUID.randomUUID().toString()) private val producer = new Producer[String, String](new ProducerConfig(props)) def send(topic: String, messages: Seq[String]): Unit = try { println("sending batch messages to kafka queue.......") val queueMessages = messages.map { message => new KeyedMessage[String, String](topic, message) } producer.send(queueMessages: _*) } catch { case ex: Exception => ex.printStackTrace() } }
  • 22. Async Producer Scala API import java.util.{Properties, UUID} import kafka.message.DefaultCompressionCodec import kafka.producer.{KeyedMessage, Producer, ProducerConfig} class KafkaProducer(brokerList: String) { private val props = new Properties() props.put("compression.codec", DefaultCompressionCodec.codec.toString) props.put("producer.type", "async") props.put("metadata.broker.list", brokerList) props.put("batch.num.messages", "200") props.put("message.send.max.retries", "5") props.put("serializer.class", "kafka.serializer.StringEncoder") props.put("client.id", UUID.randomUUID().toString()) private val producer = new Producer[String, String](new ProducerConfig(props)) def send(topic: String, messages: Seq[String]): Unit = try { println("sending batch messages to kafka queue.......") val queueMessages = messages.map { message => new KeyedMessage[String, String](topic, message) } producer.send(queueMessages: _*) } catch { case ex: Exception => ex.printStackTrace() } }
  • 23. Producer Java API import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.RecordMetadata; import org.apache.kafka.common.serialization.StringSerializer; import org.apache.kafka.clients.producer.KafkaProducer; import java.util.Properties; import java.util.concurrent.Future; public class Producer { private final KafkaProducer<String, String> producer; public Producer(String servers) { Properties props = new Properties(); props.put("bootstrap.servers", servers); props.put("acks", "all"); props.put("retries", 5); props.put("key.serializer", StringSerializer.class.getName()); props.put("value.serializer", StringSerializer.class.getName()); producer = new KafkaProducer<String, String>(props); } public Future<RecordMetadata> send(String topic, String record) { return producer.send(new ProducerRecord<String, String>(topic, record, record)); } }
  • 24. Producer With Callback Java API import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.RecordMetadata; import org.apache.kafka.common.serialization.StringSerializer; import org.apache.kafka.clients.producer.*; import java.util.Properties; import java.util.concurrent.Future; public class Producer { private final KafkaProducer<String, String> producer; public Producer(String servers) { Properties props = new Properties(); props.put("bootstrap.servers", servers); props.put("acks", "all"); props.put("retries", 5); props.put("key.serializer", StringSerializer.class.getName()); props.put("value.serializer", StringSerializer.class.getName()); producer = new KafkaProducer<String, String>(props); } public Future<RecordMetadata> send(String topic, String record) { ProducerRecord<String, String> message = new ProducerRecord(topic, record, record); return producer.send(message, new CallbackHandler()); } } class CallbackHandler implements Callback { public void onCompletion(RecordMetadata metadata, Exception e) { if(e != null) e.printStackTrace(); System.out.println("The offset of the record we just sent is: " + metadata.offset()); } }
  • 25. Producer Throughput On a Single producer thread, no replication ● Date 78.3 MB/sec ● Messages: 821,557 records/sec Single producer thread, 3x asynchronous replication ● Data: 75.1 MB/sec ● Messages: 786,980 records/sec Single producer thread, 3x synchronous replication ● Data: 40.2 MB/sec ● Messages: 421,823 records/sec https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
  • 26. Producer Throughput Versus Stored Data https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
  • 27. Producer Throughput Versus Stored Data https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines Kafka always persists messages the performance is O(1) with respect to unconsumed data volume
  • 28. Consumer Scala API class KafkaConsumer(topic: String, groupId: String, zookeeperConnect: String) { private val props = new Properties() props.put("group.id", groupId) props.put("zookeeper.connect", zookeeperConnect) props.put("auto.offset.reset", "smallest") props.put("consumer.timeout.ms", "500") props.put("auto.commit.interval.ms", "500") private val config = new ConsumerConfig(props) private val connector = Consumer.create(config) private val filterSpec = new Whitelist(topic) val numStreamsPerTopic=1 val keyDecoder=new DefaultDecoder() val valueDecoder=new DefaultDecoder() val streams = connector.createMessageStreamsByFilter(filterSpec, numStreamsPerTopic, keyDecoder, valueDecoder)(0) lazy val iterator = streams.iterator() def read():Option[String] = try { if (hasNext) { println("Getting message from queue.............") val message = iterator.next().message() Some(new String(message)) } else { None } } catch { case ex: Throwable => None } private def hasNext(): Boolean =try{ iterator.hasNext() }catch { case timeOutEx: ConsumerTimeoutException => false } }
  • 29. Consumer Java APIpublic class Consumer { private final KafkaConsumer<String, String> consumer; private final List<String> topics; private final int id; private final long timeout=10000; public Consumer(int id, String groupId, String servers, List<String> topics) { this.id = id; this.topics = topics; Properties props = new Properties(); props.put("bootstrap.servers", servers); props.put("group.id", groupId); props.put("key.deserializer", StringDeserializer.class.getName()); props.put("value.deserializer", StringDeserializer.class.getName()); consumer = new KafkaConsumer(props); consumer.subscribe(topics); } public List<String> read() { try { ConsumerRecords<String, String> consumerRecords = consumer.poll(timeout); List<String> records = new ArrayList(); consumerRecords.forEach( record -> records.add(record.value())); return records; } catch (WakeupException e) { e.printStackTrace(); return Arrays.asList(); } finally { consumer.close(); } } }
  • 30. Consumer Throughput Single Consumer: ● Data: 89.7 MB/sec ● Messages: 940,521 records/sec Three Consumers: ● Data: 249.5 MB/sec ● Messages: 2,615,968 records/sec https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
  • 31. Producer and Consumer Throughput https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines One producer with 3x async replication and one consumer: Data: 75.8 MB/sec Messages: 795,064 records/sec
  • 32. Effect of Message Size https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
  • 33. Effect of Message Size https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines
  • 36. References ● http://kafka.apache.org/documentation.html ● https://engineering.linkedin.com/kafka/benchmarking-apache-k ● http://www.confluent.io/blog/tutorial-getting-started-with-the-new ● http://kafka-summit.org
  • 38. Github Code URL ● https://github.com/knoldus/activator-kafka-scala-pro ● https://github.com/knoldus/activator-kafka-java-prod

Editor's Notes

  • #4: If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers. If all the consumer instances have different consumer groups, then this works like publish-subscribe and all messages are broadcast to all consumers.
  • #9: If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers. If all the consumer instances have different consumer groups, then this works like publish-subscribe and all messages are broadcast to all consumers.
  • #10: If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers. If all the consumer instances have different consumer groups, then this works like publish-subscribe and all messages are broadcast to all consumers.
  • #11: If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers. If all the consumer instances have different consumer groups, then this works like publish-subscribe and all messages are broadcast to all consumers.