apache-nifitombstone

Nifi ConsumeKafka processor, Null message based routing


Am using ConsumeKafka processor in nifi. I have a scenario to check if kafka message received is a null message. kafka tombstone scenario basically. And do the routing on that basis. how this can be achieved.


Solution

  • https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-2-6-nar/1.25.0/org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_2_6/index.html

    The ConsumeKafka_2_6 processor Writes Attributes:

    kafka.tombstone Set to true if the consumed message is a tombstone message


    So, you just need to use RouteOnAttribute after ConsumeKafka_2_6 with check if kafka.tombstone=true