Learnitweb

Category: Spring-boot-apache-kafka

  • Kafka Producer in Spring Boot

    In this tutorial, we’ll create a Kafka producer in Spring Boot. Dependency To work with Kafka in Spring Boot, add the following dependency: Configuration Add the following configuration in the properties file, application.properties: Explaination: 2. Key Serializer 3. Value Serializer Implementation Following is the Following is the important piece of code to send event: Note:…

  • Introduction to Kafka Consumer CLI

    Introduction In this tutorial, you will learn how to use the Apache Kafka Console Consumer to read messages from a Kafka topic using the Apache Kafka command-line interface (CLI). Introduction to Kafka Console Consumer Kafka Console Consumer is a built-in tool provided by Apache Kafka that allows you to read messages from a specified Kafka…

  • Sending Messages to a Kafka Topic Using the CLI

    The kafka-console-producer.sh script is a built-in Kafka command-line tool used to send messages to a Kafka topic. It connects to the Kafka cluster via the specified bootstrap servers and allows users to input messages interactively. This tool is useful for testing Kafka producers and debugging message flows. Before proceeding with this lesson, ensure that your…

  • Managing Apache Kafka Topics Using CLI

    Introduction Apache Kafka provides a Command Line Interface (CLI) to manage and interact with topics within a Kafka cluster. While Java code can be used for complex interactions, the CLI is a quick and convenient way to perform common tasks such as listing topics, checking their status, and modifying configurations. Kafka Topics CLI Overview Kafka…

  • Set up Apache Kafka Locally

    Download Apache Kafka To download Apache Kafka, open a web browser and navigate to the official Apache Kafka website. On the homepage, locate the Download Kafka button in the top-right corner and click on it. On the download page, you will find different versions of Apache Kafka available for download. The latest stable release at…

  • Apache Kafka Broker and leader follower rules

    Introduction Apache Kafka is a distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. At the heart of Kafka’s architecture lies the Kafka Broker, which plays a crucial role in managing and processing event streams. This tutorial provides a detailed understanding of what a…

  • Ordering of events in Apache Kafka

    Introduction Understanding how events are stored and processed in Kafka topics is crucial for maintaining correct data consistency and order. In this tutorial, we will explore how Kafka handles event storage across partitions and how message keys can help maintain event order. Event Storage in Kafka Topics Kafka topics store published messages, which are distributed…

  • Understanding Kafka Topics

    Introduction In this tutorial, you will learn about Kafka topics and their role in event-driven architectures. Kafka topics serve as storage for published messages and allow multiple microservices to consume events efficiently. Kafka is widely used in distributed systems for real-time data streaming and event-driven applications. What is Kafka Topic? A Kafka topic is a…

  • Messages and Events in Apache Kafka

    Apache Kafka is a powerful tool that helps in building event-driven microservices. But before diving deeper, let’s understand the fundamental concept of an event. What is an Event? In Apache Kafka, an event is an indication that something has happened in the system. For example: Events represent changes in the state of an application or…

  • Event-Driven Microservices with Apache Kafka

    Introduction In modern software development, microservices often need to communicate with each other. A common communication pattern is the traditional request-response mechanism, where one microservice sends an HTTP request to another and waits for a response. While this works well for many use cases, it has limitations when multiple microservices need to receive the same…