SlideShare a Scribd company logo
Confidential │ ©2021 VMware, Inc.
Walking through the Spring
Stack for Apache Kafka
Kafka Summit London
April 25-26, 2022
Confidential │ ©2022 VMware, Inc. 2
About me...
Soby Chacko
Committer - Spring Cloud Stream/Spring
Cloud Data Flow at VMware
Tech lead for Spring Cloud Stream
Kafka/Kafka Streams binders
Twitter: @sobychacko
Github: github.com/sobychacko
Confidential │ ©2022 VMware, Inc. 3
Agenda
● Comprehensive look at the Apache Kafka
ecosystem in Spring
● Demo Applications
● Questions
Confidential │ ©2022 VMware, Inc. 4
Spring Stack for Apache Kafka
Spring Boot
Spring for Apache Kafka
Spring Integration Kafka
Spring Cloud Stream Binders for Kafka
and Kafka Streams
Reactor Kafka
Apache Kafka Java Client / Kafka Streams Client
Confidential │ ©2022 VMware, Inc. 5
Spring for Apache Kafka - Top Level Ideas
➔ Foundational library for Apache Kafka in Spring
➔ Spring friendly programming abstractions
➔ Many features that allow developers to focus on the business logic
➔ Provides abstractions for low-level infrastructure concerns
➔ Leverages and builds upon Apache Kafka Java Client / Kafka
Streams
Confidential │ ©2022 VMware, Inc. 6
Spring for Apache Kafka - Topic Management
@Bean
public KafkaAdmin admin() {
Map<String, Object> configs = new HashMap<>();
configs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
return new KafkaAdmin(configs);
}
@Bean
public NewTopic myTopic() {
return TopicBuilder.name("my-topic")
.partitions(10)
.replicas(3)
.compact()
.build();
}
@Bean
public KafkaAdmin.NewTopics bunchOfTopics() {
return new KafkaAdmin.NewTopics(
TopicBuilder.name("topic1")
.build(),
TopicBuilder.name("topic2")
.replicas(1)
.build(),
TopicBuilder.name("topic3")
.partitions(3)
.build());
}
Confidential │ ©2022 VMware, Inc. 7
Publishing Records using KafkaTemplate API
KafkaTemplate provides a wide variety of template methods to publish records
ListenableFuture<SendResult<K, V>> sendDefault(K key, V data);
ListenableFuture<SendResult<K, V>> send(String topic, K key, V data);
ListenableFuture<SendResult<K, V>> send(String topic, Integer partition, K key, V data);
Confidential │ ©2022 VMware, Inc. 8
Async Send Example
ListenableFuture<SendResult<Integer, String>> future =
template.send("topic", 1, "data");
future.addCallback(new KafkaSendCallback<Integer, String>() {
@Override
public void onSuccess(SendResult<Integer, String> result) {...}
@Override
public void onFailure(KafkaProducerException ex) {
ProducerRecord<Integer, String> failed = ex.getFailedProducerRecord();
...
}
});
Confidential │ ©2022 VMware, Inc. 9
Producer Factory
● KafkaTemplate uses the producer factory for creating the producer
● Spring Boot auto-configures a producer factory bean
● Applications can provide custom producer factories
@Bean
public ProducerFactory<?, ?> kafkaProducerFactory() {
DefaultKafkaProducerFactory<?, ?> factory = new DefaultKafkaProducerFactory<>(
Map.of(...))
…
return factory;
}
Confidential │ ©2022 VMware, Inc. 10
Consuming Records using KafkaListener
● @KafkaListener annotation provides a lot of flexible options to consume records
from Kafka topics
● @EnableKafka annotation
@KafkaListener(id = "my-group", topics = "my-topic")
public void listen(String in) {
logger.info("Data Received : " + in);
}
Basic KafkaListener
Confidential │ ©2022 VMware, Inc. 11
KafkaListener with More Options
See the reference docs for all the available options of KafkaListener.
@KafkaListener(id = "my-group", topicPartitions =
@TopicPartition(topic = "my-topic", partitionOffsets = {
@PartitionOffset(partition = "0-2", initialOffset = "0"),
@PartitionOffset(partition = "6-9", initialOffset = "0")}),
concurrency = ${config.concurrency}
properties = "key.deserializer:LongDeserializer")
public void listen(String in, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) Long key,
@Header(KafkaHeaders.RECEIVED_PARTITION_ID) int part,
@Header(KafkaHeaders.OFFSET) int offset) {
logger.info( "Data Received : {} with key {} from partition {} and offset {}.",
in, key,part,offset);
}
Confidential │ ©2022 VMware, Inc. 12
KafkaListener on a Class
@KafkaListener(id = "multi", topics = "myTopic")
static class MultiListenerBean {
@KafkaHandler
public void listen1(String foo) {
...
}
@KafkaHandler
public void listen2(Integer bar) {
...
}
@KafkaHandler(isDefault = true)
public void listenDefault(Object object) {
...
}
}
Confidential │ ©2022 VMware, Inc. 13
MessageListenerContainer
● Behind the scenes, KafkaListener uses a MessageListener
Container for accomplishing various tasks such as polling,
committing, error handling etc.
● KafkaMessageListenerContainer - Single listener thread
● ConcurrentKafkaMessageListenerContainer - Multiple listeners
● Spring Boot auto-configures a factory for creating a message listener
container
Confidential │ ©2022 VMware, Inc. 14
MessageListeners
● Spring for Apache Kafka provides various types of message listeners
● Record and Batch based Message Listeners
● onMessage(...) method that gives access to the consumer record
● You can provide your own implementation to the container
● MessageListener
● AcknowledgingMessageListener
● ConsumerAwareMessageListener
● AcknowledgingConsumerAwareMessageListener
● BatchMessageListener
● BatchAcknowledgingMessageListener
● BatchConsumerAwareMessageListener
● BatchAcknowledgingConsumerAwareMessageListener
Confidential │ ©2022 VMware, Inc. 15
Committing the Offsets
● By default, enable.auto.commit is disabled in Spring for Apache
Kafka and the framework is responsible for committing the offsets
● A number of options are available for commits which the applications
can configure on the container through the AckMode property of
ContainerProperties
– RECORD, BATCH, TIME, COUNT, MANUAL,
MANUAL_IMMEDIATE
● Default AckMode is the BATCH
Confidential │ ©2022 VMware, Inc. 16
KafkaListener Example of Manually Acknowledging
@KafkaListener(id = "cat",
topics = "myTopic",
containerFactory =
"kafkaManualAckListenerContainerFactory")
public void listen(String data, Acknowledgment ack) {
…
ack.acknowledge();
}
Confidential │ ©2022 VMware, Inc. 17
Seeking Offsets
● Listener must implement the ConsumerSeekAware interface
● Framework provides a convenient AbstractConsumerSeekAware
● Using the callbacks, the application can do arbitrary seeks such as
seekToBeginning, seekToEnd, seekToRelative, seekToTimestamp
etc.
void registerSeekCallback(ConsumerSeekCallback callback);
void onPartitionsAssigned(Map<TopicPartition, Long> assignments,
ConsumerSeekCallback callback);
void onPartitionsRevoked(Collection<TopicPartition> partitions);
void onIdleContainer(Map<TopicPartition, Long> assignments,
ConsumerSeekCallback callback);
Confidential │ ©2022 VMware, Inc. 18
Container Error Handling
● Container Error Handler - CommonErrorHandler interface
● Default implementation - DefaultErrorHandler
● By default, DefaultErrorHandler provides 10 max attempts and no backoff
● You can provide a custom bean that overrides these defaults
@Bean
public DefaultErrorHandler errorHandler(
DeadletterPublishingRecoverer recoverer) {
DefaultErrorHandler handler = new DefaultErrorHandler(recoverer,
new FixedBackOff(2_000, 2));
handler.addNotRetryableExceptions(IllegalArgumentException.class);
return handler;
}
Confidential │ ©2022 VMware, Inc. 19
ErrorHandlingDeserializer
● Convenient way to catch deserialization errors
● ErrorHandlingDeserializer has delegates to the actual key/value
deserializers
● When deserialization fails, the proper headers are populated with
the exception and the raw data that failed
● Then normal container error handling rules apply
Confidential │ ©2022 VMware, Inc. 20
Extensive Error Handling Options
● Spring for Apache Kafka provides much more features, options and flexibility for
error handling. See the reference documentation for more information.
https://docs.spring.io/spring-kafka/docs/current/reference/html/#annotation-error-handling
● Non Blocking Retries - A feature in active development. See the documentation
section for more details.
https://docs.spring.io/spring-kafka/docs/current/reference/html/#retry-topic
Confidential │ ©2022 VMware, Inc. 21
Testing using EmbeddedKafka Broker
● spring-kafka-test provides a convenient way to test with an embedded broker
● EmbeddedKafka annotation and EmbeddedKafkaBroker for Spring test context with JUnit 5
● For non-spring test context, use the EmbeddedKafkaCondition with JUnit 5
● For JUnit4, use EmbeddedKafkaRule, which is a JUnit4 ClassRule
● More details at:
https://docs.spring.io/spring-kafka/docs/current/reference/html/#embedded-kafka-annotation
@SpringBootTest
@EmbeddedKafka(topics = "my-topic", bootstrapServersProperty =
"spring.kafka.bootstrap-servers")
class SpringKafkaApp1Tests {
@Test
void test(EmbeddedKafkaBroker broker) {
// ...
}
}
Confidential │ ©2022 VMware, Inc. 22
Advanced Spring for Apache Kafka features
● Request/Reply Semantics -
https://docs.spring.io/spring-kafka/docs/current/reference/html/#replyi
ng-template
● Transactions -
https://docs.spring.io/spring-kafka/docs/current/reference/html/#trans
actions
● Kafka Streams Support -
https://docs.spring.io/spring-kafka/docs/current/reference/html/#strea
ms-kafka-streams
Confidential │ ©2022 VMware, Inc. 23
Spring Integration Overview
● Messages and Channels
● Integration Flows
- Spring Integration is used to create complex EIP flows
- Kafka flows can tap into larger flows
● Provides Java Config and DSL
Confidential │ ©2022 VMware, Inc. 24
Spring Integration Kafka Support
● Outbound Channel Adapter – KafkaProducerMessageHandler
● Kafka Message Driven Channel Adapter
● Inbound Channel Adapter - Provides a KafkaMessageSource which
is a pollable channel adapter implementation.
● Outbound Gateway - for request/reply operations
● Inbound Gateway - for request/reply operations
See more details in the reference docs for Spring Integration at
https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html#kafka
Confidential │ ©2022 VMware, Inc. 25
Spring Cloud Stream Overview
● General purpose framework for writing event driven/stream
processing micro services
● Programming model based on Spring Cloud Function - Java
8 Functions/Function Composition
● Apache Kafka support is built on top of Spring Boot, Spring
for Apache Kafka, Spring Integration and Kafka Streams
Confidential │ ©2022 VMware, Inc. 26
Spring Cloud Stream Kafka Application Architecture
Spring Boot Application
Spring Cloud Stream App Core
Kafka/Kafka Streams Binder
Inputs (Message
Channel/Kafka
Streams)
Outputs(Message
Channel/Kafka
Streams)
Kafka Broker
Spring Integration/Kafka Streams
Spring for Apache Kafka
Confidential │ ©2022 VMware, Inc. 27
Spring Cloud Stream - Kafka Binder
● Auto provisioning of topics
● Producer/Consumer Binding
● Message Converters/Native Serialization
● DLQ Support
● Health checks for the binder
Confidential │ ©2022 VMware, Inc. 28
Spring Cloud Stream Kafka Binder Programming Model
@SpringBootApplication
…
@Bean
public Supplier<Long> currentTime() {
return System::currentTimeMillis;
}
@Bean
public Function<Long, String> convertToUTC() {
return localTime -> formatUTC();
}
@Bean
public Consumer<String> print() {
System.out::println;
}
Confidential │ ©2022 VMware, Inc. 29
Spring Cloud Stream - Kafka Streams Binder
● Built on the Kafka Streams foundations from Spring for Apache
Kafka - StreamsBuilderFactoryBean
● Kafka Streams processors written as Java functions
● KStream, KTable and GlobalKTable bindings
● Serde inference on input/output
● Interactive Query Support
● Multiple functions in the same application
● Function composition
Confidential │ ©2022 VMware, Inc. 30
Examples of Spring Cloud Stream Kafka Streams Functions
@Bean
public Function<KStream<Object, String>, KStream<String, Long>> wordCount()
{
return input -> input
.flatMapValues(value ->
Arrays.asList(value.toLowerCase().split("W+")))
.map((key, value) -> new KeyValue<>(value, value))
.groupByKey()
.windowedBy(TimeWindows.of(Duration.ofSeconds(WINDOW_SIZE_SECONDS)))
.count()
.toStream()
.map((key, value) -> new KeyValue<>(key.key(), value));
}
@Bean
public Consumer<KStream<Object, Long>> logWordCounts() {
return kstream -> kstream.foreach((key, value) -> {
logger.info(String.format("Word counts for: %s t %d", key, value));
});
}
Confidential │ ©2022 VMware, Inc. 31
Resources
Spring for Apache Kafka
Project Site Reference Docs GitHub StackOverflow
Spring Integration Kafka
Project Site Reference Docs GitHub StackOverflow
Spring Cloud Stream
Project Site Reference Docs GitHub StackOverflow
Spring Boot Kafka Docs
Confidential │ ©2021 VMware, Inc. 32
Demo
https://github.com/schacko-samples/kafka-summit-london-2022
Confidential │ ©2021 VMware, Inc. 33

More Related Content

What's hot

Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsRunning Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsLightbend
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database Systemconfluent
 
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)confluent
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams APIconfluent
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explainedconfluent
 
Producer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaProducer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaJiangjie Qin
 
How Apache Kafka® Works
How Apache Kafka® WorksHow Apache Kafka® Works
How Apache Kafka® Worksconfluent
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushLucas Jellema
 
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...HostedbyConfluent
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Flink Forward
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin PodvalMartin Podval
 
Building Streaming Data Applications Using Apache Kafka
Building Streaming Data Applications Using Apache KafkaBuilding Streaming Data Applications Using Apache Kafka
Building Streaming Data Applications Using Apache KafkaSlim Baltagi
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Flink Forward
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practicesconfluent
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache KafkaAmir Sedighi
 

What's hot (20)

Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsRunning Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
Apache Kafka Best Practices
Apache Kafka Best PracticesApache Kafka Best Practices
Apache Kafka Best Practices
 
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)
Dissolving the Problem (Making an ACID-Compliant Database Out of Apache Kafka®)
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams API
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Producer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache KafkaProducer Performance Tuning for Apache Kafka
Producer Performance Tuning for Apache Kafka
 
How Apache Kafka® Works
How Apache Kafka® WorksHow Apache Kafka® Works
How Apache Kafka® Works
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
 
Kafka basics
Kafka basicsKafka basics
Kafka basics
 
kafka
kafkakafka
kafka
 
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...Event-driven Microservices with Python and Apache Kafka with Dave Klein  | Ka...
Event-driven Microservices with Python and Apache Kafka with Dave Klein | Ka...
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
 
Building Streaming Data Applications Using Apache Kafka
Building Streaming Data Applications Using Apache KafkaBuilding Streaming Data Applications Using Apache Kafka
Building Streaming Data Applications Using Apache Kafka
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
 

Similar to Walking through the Spring Stack for Apache Kafka with Soby Chacko | Kafka Summit London 2022

Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMwareEvent Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMwareHostedbyConfluent
 
Kubernetes 101 and Fun
Kubernetes 101 and FunKubernetes 101 and Fun
Kubernetes 101 and FunQAware GmbH
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David AndersonVerverica
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRNProject ACRN
 
20180607 master your vms with vagrant
20180607 master your vms with vagrant20180607 master your vms with vagrant
20180607 master your vms with vagrantmakker_nl
 
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...HostedbyConfluent
 
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...HostedbyConfluent
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI AdminKendrick Coleman
 
Knative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKnative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKCDItaly
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalPatrick Chanezon
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User ExperienceAccumulo Summit
 
Ports, pods and proxies
Ports, pods and proxiesPorts, pods and proxies
Ports, pods and proxiesLibbySchulze
 
Kubernetes 101 VMworld 2019 workshop slides
Kubernetes 101 VMworld 2019 workshop slidesKubernetes 101 VMworld 2019 workshop slides
Kubernetes 101 VMworld 2019 workshop slidesSimone Morellato
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechChristopher Bumgardner
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Velocidex Enterprises
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersLakmal Warusawithana
 

Similar to Walking through the Spring Stack for Apache Kafka with Soby Chacko | Kafka Summit London 2022 (20)

Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMwareEvent Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
 
Kubernetes 101 and Fun
Kubernetes 101 and FunKubernetes 101 and Fun
Kubernetes 101 and Fun
 
Kubernetes 101 and Fun
Kubernetes 101 and FunKubernetes 101 and Fun
Kubernetes 101 and Fun
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRN
 
20180607 master your vms with vagrant
20180607 master your vms with vagrant20180607 master your vms with vagrant
20180607 master your vms with vagrant
 
Make Accelerator Pluggable for Container Engine
Make Accelerator Pluggable for Container EngineMake Accelerator Pluggable for Container Engine
Make Accelerator Pluggable for Container Engine
 
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...
Apache Kafka’s Transactions in the Wild! Developing an exactly-once KafkaSink...
 
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...
Scaling an Event-Driven Architecture with IBM and Confluent | Antony Amanse a...
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI Admin
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Vagrant
VagrantVagrant
Vagrant
 
Knative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKnative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre Roman
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User Experience
 
Ports, pods and proxies
Ports, pods and proxiesPorts, pods and proxies
Ports, pods and proxies
 
Kubernetes 101 VMworld 2019 workshop slides
Kubernetes 101 VMworld 2019 workshop slidesKubernetes 101 VMworld 2019 workshop slides
Kubernetes 101 VMworld 2019 workshop slides
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
 

More from HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonHostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolHostedbyConfluent
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesHostedbyConfluent
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaHostedbyConfluent
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonHostedbyConfluent
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonHostedbyConfluent
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyHostedbyConfluent
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...HostedbyConfluent
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...HostedbyConfluent
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersHostedbyConfluent
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformHostedbyConfluent
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubHostedbyConfluent
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonHostedbyConfluent
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLHostedbyConfluent
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceHostedbyConfluent
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondHostedbyConfluent
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsHostedbyConfluent
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemHostedbyConfluent
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksHostedbyConfluent
 

More from HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

Walking through the Spring Stack for Apache Kafka with Soby Chacko | Kafka Summit London 2022

  • 1. Confidential │ ©2021 VMware, Inc. Walking through the Spring Stack for Apache Kafka Kafka Summit London April 25-26, 2022
  • 2. Confidential │ ©2022 VMware, Inc. 2 About me... Soby Chacko Committer - Spring Cloud Stream/Spring Cloud Data Flow at VMware Tech lead for Spring Cloud Stream Kafka/Kafka Streams binders Twitter: @sobychacko Github: github.com/sobychacko
  • 3. Confidential │ ©2022 VMware, Inc. 3 Agenda ● Comprehensive look at the Apache Kafka ecosystem in Spring ● Demo Applications ● Questions
  • 4. Confidential │ ©2022 VMware, Inc. 4 Spring Stack for Apache Kafka Spring Boot Spring for Apache Kafka Spring Integration Kafka Spring Cloud Stream Binders for Kafka and Kafka Streams Reactor Kafka Apache Kafka Java Client / Kafka Streams Client
  • 5. Confidential │ ©2022 VMware, Inc. 5 Spring for Apache Kafka - Top Level Ideas ➔ Foundational library for Apache Kafka in Spring ➔ Spring friendly programming abstractions ➔ Many features that allow developers to focus on the business logic ➔ Provides abstractions for low-level infrastructure concerns ➔ Leverages and builds upon Apache Kafka Java Client / Kafka Streams
  • 6. Confidential │ ©2022 VMware, Inc. 6 Spring for Apache Kafka - Topic Management @Bean public KafkaAdmin admin() { Map<String, Object> configs = new HashMap<>(); configs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); return new KafkaAdmin(configs); } @Bean public NewTopic myTopic() { return TopicBuilder.name("my-topic") .partitions(10) .replicas(3) .compact() .build(); } @Bean public KafkaAdmin.NewTopics bunchOfTopics() { return new KafkaAdmin.NewTopics( TopicBuilder.name("topic1") .build(), TopicBuilder.name("topic2") .replicas(1) .build(), TopicBuilder.name("topic3") .partitions(3) .build()); }
  • 7. Confidential │ ©2022 VMware, Inc. 7 Publishing Records using KafkaTemplate API KafkaTemplate provides a wide variety of template methods to publish records ListenableFuture<SendResult<K, V>> sendDefault(K key, V data); ListenableFuture<SendResult<K, V>> send(String topic, K key, V data); ListenableFuture<SendResult<K, V>> send(String topic, Integer partition, K key, V data);
  • 8. Confidential │ ©2022 VMware, Inc. 8 Async Send Example ListenableFuture<SendResult<Integer, String>> future = template.send("topic", 1, "data"); future.addCallback(new KafkaSendCallback<Integer, String>() { @Override public void onSuccess(SendResult<Integer, String> result) {...} @Override public void onFailure(KafkaProducerException ex) { ProducerRecord<Integer, String> failed = ex.getFailedProducerRecord(); ... } });
  • 9. Confidential │ ©2022 VMware, Inc. 9 Producer Factory ● KafkaTemplate uses the producer factory for creating the producer ● Spring Boot auto-configures a producer factory bean ● Applications can provide custom producer factories @Bean public ProducerFactory<?, ?> kafkaProducerFactory() { DefaultKafkaProducerFactory<?, ?> factory = new DefaultKafkaProducerFactory<>( Map.of(...)) … return factory; }
  • 10. Confidential │ ©2022 VMware, Inc. 10 Consuming Records using KafkaListener ● @KafkaListener annotation provides a lot of flexible options to consume records from Kafka topics ● @EnableKafka annotation @KafkaListener(id = "my-group", topics = "my-topic") public void listen(String in) { logger.info("Data Received : " + in); } Basic KafkaListener
  • 11. Confidential │ ©2022 VMware, Inc. 11 KafkaListener with More Options See the reference docs for all the available options of KafkaListener. @KafkaListener(id = "my-group", topicPartitions = @TopicPartition(topic = "my-topic", partitionOffsets = { @PartitionOffset(partition = "0-2", initialOffset = "0"), @PartitionOffset(partition = "6-9", initialOffset = "0")}), concurrency = ${config.concurrency} properties = "key.deserializer:LongDeserializer") public void listen(String in, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) Long key, @Header(KafkaHeaders.RECEIVED_PARTITION_ID) int part, @Header(KafkaHeaders.OFFSET) int offset) { logger.info( "Data Received : {} with key {} from partition {} and offset {}.", in, key,part,offset); }
  • 12. Confidential │ ©2022 VMware, Inc. 12 KafkaListener on a Class @KafkaListener(id = "multi", topics = "myTopic") static class MultiListenerBean { @KafkaHandler public void listen1(String foo) { ... } @KafkaHandler public void listen2(Integer bar) { ... } @KafkaHandler(isDefault = true) public void listenDefault(Object object) { ... } }
  • 13. Confidential │ ©2022 VMware, Inc. 13 MessageListenerContainer ● Behind the scenes, KafkaListener uses a MessageListener Container for accomplishing various tasks such as polling, committing, error handling etc. ● KafkaMessageListenerContainer - Single listener thread ● ConcurrentKafkaMessageListenerContainer - Multiple listeners ● Spring Boot auto-configures a factory for creating a message listener container
  • 14. Confidential │ ©2022 VMware, Inc. 14 MessageListeners ● Spring for Apache Kafka provides various types of message listeners ● Record and Batch based Message Listeners ● onMessage(...) method that gives access to the consumer record ● You can provide your own implementation to the container ● MessageListener ● AcknowledgingMessageListener ● ConsumerAwareMessageListener ● AcknowledgingConsumerAwareMessageListener ● BatchMessageListener ● BatchAcknowledgingMessageListener ● BatchConsumerAwareMessageListener ● BatchAcknowledgingConsumerAwareMessageListener
  • 15. Confidential │ ©2022 VMware, Inc. 15 Committing the Offsets ● By default, enable.auto.commit is disabled in Spring for Apache Kafka and the framework is responsible for committing the offsets ● A number of options are available for commits which the applications can configure on the container through the AckMode property of ContainerProperties – RECORD, BATCH, TIME, COUNT, MANUAL, MANUAL_IMMEDIATE ● Default AckMode is the BATCH
  • 16. Confidential │ ©2022 VMware, Inc. 16 KafkaListener Example of Manually Acknowledging @KafkaListener(id = "cat", topics = "myTopic", containerFactory = "kafkaManualAckListenerContainerFactory") public void listen(String data, Acknowledgment ack) { … ack.acknowledge(); }
  • 17. Confidential │ ©2022 VMware, Inc. 17 Seeking Offsets ● Listener must implement the ConsumerSeekAware interface ● Framework provides a convenient AbstractConsumerSeekAware ● Using the callbacks, the application can do arbitrary seeks such as seekToBeginning, seekToEnd, seekToRelative, seekToTimestamp etc. void registerSeekCallback(ConsumerSeekCallback callback); void onPartitionsAssigned(Map<TopicPartition, Long> assignments, ConsumerSeekCallback callback); void onPartitionsRevoked(Collection<TopicPartition> partitions); void onIdleContainer(Map<TopicPartition, Long> assignments, ConsumerSeekCallback callback);
  • 18. Confidential │ ©2022 VMware, Inc. 18 Container Error Handling ● Container Error Handler - CommonErrorHandler interface ● Default implementation - DefaultErrorHandler ● By default, DefaultErrorHandler provides 10 max attempts and no backoff ● You can provide a custom bean that overrides these defaults @Bean public DefaultErrorHandler errorHandler( DeadletterPublishingRecoverer recoverer) { DefaultErrorHandler handler = new DefaultErrorHandler(recoverer, new FixedBackOff(2_000, 2)); handler.addNotRetryableExceptions(IllegalArgumentException.class); return handler; }
  • 19. Confidential │ ©2022 VMware, Inc. 19 ErrorHandlingDeserializer ● Convenient way to catch deserialization errors ● ErrorHandlingDeserializer has delegates to the actual key/value deserializers ● When deserialization fails, the proper headers are populated with the exception and the raw data that failed ● Then normal container error handling rules apply
  • 20. Confidential │ ©2022 VMware, Inc. 20 Extensive Error Handling Options ● Spring for Apache Kafka provides much more features, options and flexibility for error handling. See the reference documentation for more information. https://docs.spring.io/spring-kafka/docs/current/reference/html/#annotation-error-handling ● Non Blocking Retries - A feature in active development. See the documentation section for more details. https://docs.spring.io/spring-kafka/docs/current/reference/html/#retry-topic
  • 21. Confidential │ ©2022 VMware, Inc. 21 Testing using EmbeddedKafka Broker ● spring-kafka-test provides a convenient way to test with an embedded broker ● EmbeddedKafka annotation and EmbeddedKafkaBroker for Spring test context with JUnit 5 ● For non-spring test context, use the EmbeddedKafkaCondition with JUnit 5 ● For JUnit4, use EmbeddedKafkaRule, which is a JUnit4 ClassRule ● More details at: https://docs.spring.io/spring-kafka/docs/current/reference/html/#embedded-kafka-annotation @SpringBootTest @EmbeddedKafka(topics = "my-topic", bootstrapServersProperty = "spring.kafka.bootstrap-servers") class SpringKafkaApp1Tests { @Test void test(EmbeddedKafkaBroker broker) { // ... } }
  • 22. Confidential │ ©2022 VMware, Inc. 22 Advanced Spring for Apache Kafka features ● Request/Reply Semantics - https://docs.spring.io/spring-kafka/docs/current/reference/html/#replyi ng-template ● Transactions - https://docs.spring.io/spring-kafka/docs/current/reference/html/#trans actions ● Kafka Streams Support - https://docs.spring.io/spring-kafka/docs/current/reference/html/#strea ms-kafka-streams
  • 23. Confidential │ ©2022 VMware, Inc. 23 Spring Integration Overview ● Messages and Channels ● Integration Flows - Spring Integration is used to create complex EIP flows - Kafka flows can tap into larger flows ● Provides Java Config and DSL
  • 24. Confidential │ ©2022 VMware, Inc. 24 Spring Integration Kafka Support ● Outbound Channel Adapter – KafkaProducerMessageHandler ● Kafka Message Driven Channel Adapter ● Inbound Channel Adapter - Provides a KafkaMessageSource which is a pollable channel adapter implementation. ● Outbound Gateway - for request/reply operations ● Inbound Gateway - for request/reply operations See more details in the reference docs for Spring Integration at https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html#kafka
  • 25. Confidential │ ©2022 VMware, Inc. 25 Spring Cloud Stream Overview ● General purpose framework for writing event driven/stream processing micro services ● Programming model based on Spring Cloud Function - Java 8 Functions/Function Composition ● Apache Kafka support is built on top of Spring Boot, Spring for Apache Kafka, Spring Integration and Kafka Streams
  • 26. Confidential │ ©2022 VMware, Inc. 26 Spring Cloud Stream Kafka Application Architecture Spring Boot Application Spring Cloud Stream App Core Kafka/Kafka Streams Binder Inputs (Message Channel/Kafka Streams) Outputs(Message Channel/Kafka Streams) Kafka Broker Spring Integration/Kafka Streams Spring for Apache Kafka
  • 27. Confidential │ ©2022 VMware, Inc. 27 Spring Cloud Stream - Kafka Binder ● Auto provisioning of topics ● Producer/Consumer Binding ● Message Converters/Native Serialization ● DLQ Support ● Health checks for the binder
  • 28. Confidential │ ©2022 VMware, Inc. 28 Spring Cloud Stream Kafka Binder Programming Model @SpringBootApplication … @Bean public Supplier<Long> currentTime() { return System::currentTimeMillis; } @Bean public Function<Long, String> convertToUTC() { return localTime -> formatUTC(); } @Bean public Consumer<String> print() { System.out::println; }
  • 29. Confidential │ ©2022 VMware, Inc. 29 Spring Cloud Stream - Kafka Streams Binder ● Built on the Kafka Streams foundations from Spring for Apache Kafka - StreamsBuilderFactoryBean ● Kafka Streams processors written as Java functions ● KStream, KTable and GlobalKTable bindings ● Serde inference on input/output ● Interactive Query Support ● Multiple functions in the same application ● Function composition
  • 30. Confidential │ ©2022 VMware, Inc. 30 Examples of Spring Cloud Stream Kafka Streams Functions @Bean public Function<KStream<Object, String>, KStream<String, Long>> wordCount() { return input -> input .flatMapValues(value -> Arrays.asList(value.toLowerCase().split("W+"))) .map((key, value) -> new KeyValue<>(value, value)) .groupByKey() .windowedBy(TimeWindows.of(Duration.ofSeconds(WINDOW_SIZE_SECONDS))) .count() .toStream() .map((key, value) -> new KeyValue<>(key.key(), value)); } @Bean public Consumer<KStream<Object, Long>> logWordCounts() { return kstream -> kstream.foreach((key, value) -> { logger.info(String.format("Word counts for: %s t %d", key, value)); }); }
  • 31. Confidential │ ©2022 VMware, Inc. 31 Resources Spring for Apache Kafka Project Site Reference Docs GitHub StackOverflow Spring Integration Kafka Project Site Reference Docs GitHub StackOverflow Spring Cloud Stream Project Site Reference Docs GitHub StackOverflow Spring Boot Kafka Docs
  • 32. Confidential │ ©2021 VMware, Inc. 32 Demo https://github.com/schacko-samples/kafka-summit-london-2022
  • 33. Confidential │ ©2021 VMware, Inc. 33