Closed dysmento closed 1 year ago
Nice. There is also this 3year old pr open that adds topicextractor #57
I noticed #57 right after I submitted this! My approach follows the convention established by other interfaces, like Aggregator
, KeyValueMapper
, ValueJoiner
, ProcessorSupplier
, Transformer
, etc. etc. You can see the pattern in https://github.com/FundingCircle/jackdaw/blob/master/src/jackdaw/streams/lambdas.clj
As of Kafka v2.0.0, it's been possible to dynamically select the topic to sink to on a per-message basis, using an interface called TopicNameExtractor. This enables some nice routing use cases. e.g., events marked urgent can go on the "urgent-priority" topic, and low priority events go to the "low-priority" topic, etc.
Confluent has a blog post from 2019 about this feature. See also KIP-303
Checklist