_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

The Complete Guide to Kafka

10. 03. 2020 1 min read intermediate

Kafka je distribuovaná streaming platforma. De-facto standard pro event-driven architektury.

Core Concepts

  • Topic — kategorie zpráv
  • Partition — horizontální dělení topicu
  • Producer — píše zprávy
  • Consumer — čte zprávy
  • Consumer Group — group of consumers, každý čte jiné partition
  • Offset — pozice v partition
  • Broker — Kafka server

Commands

Vytvoření topicu

kafka-topics –create –topic orders –partitions 6 –replication-factor 3

Listování

kafka-topics –list

Produce

kafka-console-producer –topic orders –bootstrap-server localhost:9092

Consume

kafka-console-consumer –topic orders –from-beginning –group my-group

Use cases

  • Event streaming (user events, logs)
  • Microservices komunikace
  • Change Data Capture (CDC)
  • Real-time analytics pipeline
  • Log aggregace

Guarantees

  • At-most-once — může ztratit zprávy
  • At-least-once — může duplikovat (default)
  • Exactly-once — idempotentní producer + transactional consume

Alternatives

  • RabbitMQ — jednodušší, message queue (ne streaming)
  • NATS — lightweight, cloud-native
  • Redpanda — Kafka-kompatibilní, bez JVM

Kdy Kafka

Kafka pro high-throughput event streaming. RabbitMQ pro task queues. NATS pro lightweight messaging.

kafkastreamingmessaging
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.