FUNCTIONAL PROGRAMMING AND KAFKA: DO THEY MIX?
summary
Functional Scala integrates with Kafka using concrete libraries and patterns: examples use FS2 Kafka with cats-effect resources, reuse a single producer, and convert consumer.records into an FS2 stream that mapAsync processes with concurrency 10 to produce and then commit offsets. The demo builds an enrich-and-publish pipeline that composes producer+consumer resources, runs an HTTP server and the Kafka pipeline concurrently with racePair/fibers, parallelizes partitions via partitionStream + powerJoinUnbounded, and recommends commitBatchWithin (500 msgs or 15s) to avoid frequent commits.
AI-written summary · about
chapters (12)
- 0:00Start
- 1:22Kafka Overview
- 2:11Kafka Architecture
- 3:05Kafka Workflow
- 8:16Kafka Summary
- 9:06Why Scala & Streaming?
- 11:49Scala & Kafka - Creating Producer
- 12:25Scala & Kafka - Creating Consumer
- 12:44Scala & Kafka - Combining Resources
- 20:13Performance tips
- 20:41Parallel partition processing
- 22:12Batching offset commits
related talks
29mKafka on Kubernetes: Does it really have to be the hard way?
30mCloudflow: Spark, Flink, and Akka Working together on Kubernetes
40mKafka, DevOps...And Resilience for All
26mProduction Grade Kafka on K8s
24mMake Your Kafka Cluster Production-Ready
03mjoins Bert Jan Schrijver during Devoxx BE 2019 to talk Kubernetes & Kafta
46mKafka Streams at the Big Data Crossroads at Lightning Speed
28mTackling Kafka, with a Small Team
