$ show eclipse-hono/hono
Eclipse Hono is a cloud-native IoT messaging platform that ingests telemetry and events from devices via multiple protocols (MQTT, CoAP, HTTP, AMQP, LoRa, Sigfox) and routes them to northbound applications over AMQP, Kafka, or Google Pub/Sub. The codebase is modular, comprising protocol adapters, device registry services (JDBC and MongoDB), authentication, command routing, and client libraries. It is built on Vert.x and Quarkus, uses Micrometer for metrics and OpenTracing/OpenTelemetry for distributed tracing. The system handles device registration, credentials management, tenant configuration, connection limits, and resource governance. It includes a CLI tool for consuming telemetry and a comprehensive integration test suite. The repository is actively maintained with frequent commits and CI pipelines.
The LLM identified 5 files worth highlighting for reuse:
A strategy that calculates a connection limit for a protocol adapter based on the available JVM memory. It estimates the memory per connection from total memory and a configured factor, then dynamically adjusts limits. Self-contained and reusable for any service needing to cap concurrent connections based on heap.
A generic caching factory for creating and reusing client instances (e.g., AMQP sender links). Supports time-to-live eviction, custom creation and removal logic, and is thread-safe. This pattern is reusable across any system that needs to pool and expire expensive resources.
Loads SQL statements from YAML files with named parameters, supporting dialect-specific overrides (e.g., H2 vs PostgreSQL). Provides a clean abstraction for externalizing SQL from Java code. Reusable for any project needing database-agnostic SQL statement management.
Manages pending MQTT PUBACK messages with configurable timeout per message. Uses a concurrent map and scheduled timer to handle overflows and timeouts. This component is self-contained and can be extracted for any MQTT client or server that needs to track unacknowledged packets.
Implements a chain-of-responsibility pattern for device authentication. A chain of authentication handlers is tried in order; the first one that successfully authenticates wins. This pattern allows composing multiple authentication mechanisms (e.g., X.509, username/password, JWT) flexibly and is reusable for any multi-auth system.