-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Description
Currently, the brod
client requires explicit topic subscriptions at initialization, making it challenging to handle dynamic topic creation efficiently. This limitation is particularly problematic in multi-tenant environments and scenarios where topics are created and removed dynamically, such as for high-priority and low-priority messaging use cases.
A feature similar to Python’s kafka-python
subscribe(pattern=...)
would allow brod
to automatically subscribe to topics matching a specified regular expression. This capability is crucial for handling use cases like:
- Multi-Tenancy: Dynamically subscribing to tenant-specific topics without restarting consumers.
- Priority-Based Processing: High-priority topics remain static, while low-priority topics (e.g., for backfills) are created on demand and removed when processing is complete.
- Efficient Resource Utilization: Reducing active partitions and consumers for topics that are only needed intermittently.
References
Python Kafka Client supports this feature via subscribe(pattern="^low_priority_.*") (KafkaConsumer Docs).
Similar functionality exists in other Kafka client libraries, enabling more dynamic topic handling.
Would love to hear feedback from the maintainers on feasibility and potential roadmap for this feature. 🚀