Skip to content

Add support for a custom Kafka topic prefix in Hono components #3680

@yasemindogan93

Description

@yasemindogan93

Issue Description

We would like to introduce a configuration property for Hono-based components to prepend a custom prefix to Kafka topic names. Currently, Hono topics follow a fixed naming scheme (e.g. hono.event.<tenant>). In some environments (e.g. multi-tenant or multi-cluster deployments), it is desirable to have an additional prefix (such as myPrefix.hono.event.<tenant>).

We propose adding a configuration option (e.g. hono.kafka.topicPrefix) that can be set via Quarkus or environment variables. All components should then consistently apply this prefix when creating or subscribing to Kafka topics.

Key Points

  1. Add a new config property (e.g. hono.kafka.topicPrefix).
  2. Apply this property across components (adapter, command router, auth service, registry, etc.) so that all Kafka producers/consumers use the custom prefix.
  3. Maintain backwards compatibility: if no prefix is set, the existing naming (e.g. hono.telemetry.<tenant>) should remain.

Rationale

Allows running multiple Hono-based environments in the same Kafka cluster.
Simplifies isolation or naming consistency across teams or tenants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestA request for adding new functionality to Hono

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions