Skip to content

telefonicaid/kafnus

Repository files navigation

🛰️ Kafnus

Kafnus is a smart city data persistence system, designed as a modern replacement for Cygnus, built on top of Kafka.

It processes NGSI notifications from the Context Broker (CB) and stores them in PostGIS and MongoDB, leveraging technologies like Faust, Kafka Connect, and custom connectors.


📦 Main Components

  • 🧭 Mosquitto + MQTT Kafka Connector
    Temporary entry point for CB notifications (to be removed once CB supports native Kafka output).

  • ⚙️ Kafnus NGSI
    Using Faust library, transforms raw notifications into structured events. Each data flow (historic, lastdata, mutable, etc.) is handled by an independent agent.

  • 🔄 Kafnus Connect
    Custom image of Kafka Connect with plugins integrated. Persists processed messages to:

    • PostGIS, via a modified JDBC connector and custom SMT.
    • MongoDB, via the official MongoDB connector.
  • 📊 Monitoring
    Integrated with Prometheus and Grafana to expose metrics from Kafka, Kafnus Connect, and Kafnus NGSI.

  • 🧪 End-to-End Testing
    Functional tests implemented in Python using Pytest and Testcontainers.


🚀 Purpose

  • Replace Cygnus in FIWARE smart city stacks.
  • Provide robust, extensible ingestion with real-time stream processing.
  • Offer a Kafka-based architecture ready for future scalability.

📁 Documentation

Complete documentation is available in the doc/ directory:


🛠️ Requirements

  • Docker + docker compose
  • Java 11+
  • Python 3.11+ (for tests)
  • Maven

About

Kafka based replacement attempt for Cygnus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5