Thanks, that makes more sense now with the example.
I think given the bespoke logic that you’re looking at here will require either a customer Single Message Transform, or a Kafka Streams/ksqlDB stream processing application.
There is the Filter
SMT from Confluent (not the same as the Apache Kafka Filter
) which can be used to conditionally apply Single Message Transform, but only to drop/include a record, not conditionally apply another SMT.