Book Image

Kafka Streams with Spring Cloud Stream [Video]

By : Prashant Kumar Pandey
5 (1)
Book Image

Kafka Streams with Spring Cloud Stream [Video]

5 (1)
By: Prashant Kumar Pandey

Overview of this book

Kafka Streams with Spring Cloud Streams will help you understand stream processing in general and apply it to Kafka Streams Programming using Spring Boot. This course uses the Kafka Streams library compatible with Spring Cloud 2020. All the source code and examples used in this course have been tested by the author on Confluent Platform 6.0.0, which is compatible with Apache Kafka 2.6 open-source distribution. This is a fully example-driven course, and you will be working with multiple examples during the entire session. We will be making extensive use of IntelliJ IDEA as the preferred development IDE and Apache Maven and Gradle as the preferred build tool. However, based on your prior experience, you should be able to work with any other IDE designed for Spring application development and any other build tool designed for Java applications. This course also makes use of Log4J2 to teach you industry-standard log implementation in your application. We will be using JUnit5, which is the latest version of JUnit, to implement unit test cases. Working examples and exercises are the most critical tool to sharpen your skills. This course consists of some programming assignments as and when appropriate. These exercises will help you validate and check your concepts and apply your learning to solve programming problems. The code bundles for this course is available in https://github.com/PacktPublishing/Kafka-Streams-with-Spring-Cloud-Stream
Table of Contents (12 chapters)
12
Keep Learning
Chapter 2
Environment Setup on Window 10 Machine
Content Locked
Section 2
Creating Your First Kafka Streams Project – Windows.
We have already learnt to set up and install Kafka cluster for Windows system. Now it is time to create our first Kafka application and run it at least once to see if everything works perfectly. We will start with a simple stream listener. The listener is a Kafka message consumer who will listen to a Kafka topic, read all incoming messages, and log it. In this session, we are going to focus on the high-level structure. Kafka and Spring are highly configurable systems so every application will have a configuration file. The application’s configurations are defined in a hierarchy. The first hierarchy starts with the Spring Cloud stream configuration. Every Spring Cloud stream configuration comes under this level. We are going to define two configurations; the first one is known as input/output channels binding and the second one is known as the binder.