Get vs Consume in NiFi

253 Views Asked by At

I see some processors have both GetXXX and ConsumeXXX variants (GetKafka an ConsumeKafka for example). When to a name a processor with GetXXX over ConsumeXXX?

Note: I understand the technical differences between ConsumeKafka and GetKafka. My question is mainly on the naming convention.

1

There are 1 best solutions below

0
On BEST ANSWER

There is no real meaning behind the names and technically they could be named anything. The typical convention is to start the processor name with a verb that describes the action being performed, followed by the system/thing being acted on.

"Get" processors are typically processors that have no incoming connection and pull data from some external source, and "Put" processors are typically processors that deliver data to an external system.

When the first Kafka processors were developed using the 0.8 Kafka client, they were called GetKafka and PutKafka. The community then wanted to also support Kafka 0.9 at the same time, so ConsumeKafka and PublishKafka were implemented which better aligned with Kafka's terminology, and also provided another name since they couldn't also be called GetKafka and PutKafka.