Project Overview

Project Purpose and Objectives

This project is the Apache Camel Kafka component, designed to integrate Apache Kafka messaging into the Apache Camel integration framework. Its primary goal is to provide a robust, configurable, and performant Kafka producer and consumer support within Camel routes, enabling seamless event-driven and streaming architectures.

Key objectives include:

Implementation Details:

Example Workflows and Use Cases

1. Kafka Message Production

2. Kafka Message Consumption with Manual Commit

3. Kafka Consumer with Resume Strategy

4. Idempotent Consumer

5. Dynamic Topic Routing with Timestamp or Regex

Stack and Technologies

Why These Technologies:

High-Level Architecture

The project is structured into several key modules:

Component Interaction Diagram

graph TB
    subgraph Camel Integration
        FE[Frontend Routes] --> PE[KafkaProducer]
        CE[KafkaConsumer] --> BE[Backend Processing]
        PE -->|Produce Records| KafkaBroker[(Kafka Broker)]
        KafkaBroker -->|Consume Records| CE
        CE --> CommitMgr[CommitManager]
        CommitMgr --> OffsetRepo[State Repository]
        CE --> ResumeStrat[Resume Strategy]
        ResumeStrat --> KafkaBroker
        CE --> IdempotentRepo[KafkaIdempotentRepository]
        FE --> Transform[Transform Processors]
        Transform --> PE
        Transform --> CE
    end

Developer Navigation

Frontend Developers Start Here

Backend Developers Focus on These Commands

Testing and Validation

Configuration and Build


Visual Diagrams

Kafka Component High-Level Architecture

graph TB
    FE[Apache Camel Routes] --> KP[KafkaProducer]
    KP --> Kafka[Kakfa Broker]
    Kafka --> KC[KafkaConsumer]
    KC --> Processor[Message Processor]
    KC --> CommitMgr[Commit Manager]
    CommitMgr --> OffsetRepo[State Repository]
    KC --> ResumeStrategy[Resume Strategy]
    ResumeStrategy --> Kafka
    KC --> IdempotentRepo[Idempotent Repository]
    Transform[Transform Processors] --> FE
    Transform --> KP
    Transform --> KC

Kafka Consumer Message Processing Workflow

flowchart TD
    Start[Start Kafka Consumer] --> Poll[Poll Kafka Broker]
    Poll --> Records[Receive ConsumerRecords]
    Records --> Process[Process Records]
    Process -->|Success| Commit[Commit Offsets]
    Process -->|Error| ErrorHandler[Handle Error]
    Commit --> Poll
    ErrorHandler --> Decision{Break on Error?}
    Decision -- Yes --> Stop[Stop Consumer]
    Decision -- No --> Poll

This overview provides a concise yet thorough roadmap to the Apache Camel Kafka component, its architecture, workflows, and developer entry points. It enables contributors to quickly grasp the system's purpose, core modules, and how to effectively navigate and extend the project.