Integration / Apache NiFi Interview Questions
What is the PublishKafka and ConsumeKafka processor pair and what are key configuration options?
PublishKafka and ConsumeKafka (and their record-aware variants PublishKafkaRecord and ConsumeKafkaRecord) are NiFi's integration points with Apache Kafka.
ConsumeKafka: Subscribes to one or more Kafka topics using the Kafka consumer group protocol. Key properties include: Kafka Brokers (bootstrap servers), Topic Name(s) (EL-supported), Group ID (consumer group name), Offset Reset (earliest/latest for new consumer groups), Max Poll Records (how many records per poll), and Honor Transactions (whether to respect Kafka transactional producers). Each polled batch produces one FlowFile containing the message value.
PublishKafka: Produces messages to a Kafka topic. Key properties: Topic Name (static or EL-expression like ${kafka.topic} for per-FlowFile routing), Failure Strategy (Route to Failure vs Roll Back), Message Key Field (for keyed messages), Delivery Guarantee (Best Effort, Wait for Local Ack, Wait for Replication). With PublishKafkaRecord, NiFi reads records from the FlowFile and publishes one Kafka message per record.
Both processors require a KafkaClientService Controller Service in NiFi 2.x for SSL, SASL, and schema registry integration.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
