Support Questions

Find answers, ask questions, and share your expertise

Nifi ConsumeKafka_2_6 (nifi 1.16.3) is reading from only 2 partition out 3 partitions from a kafka topic

avatar
Master Collaborator

Hello experts,

We are facing an issue, where preprod Nifi server is able to read a kafka topic correctly.
It is able to read all 3 partitions data.

At the same time UAT Nifi server is connecting to same topic with different consumer group id and which is reading only the partition 0 & partition 1 but not partition 2.

Screen shot from Lenses abt the same consumer group which is facing issue

hegdemahendra_0-1707138486136.png

 

Any idea what could be the possible reasons?

Thanks

Mahendra

1 ACCEPTED SOLUTION

avatar
Master Mentor

@hegdemahendra 

Curious about the differences between your prod and uat environments here.
1. Same number of nodes in each environments NiFi cluster?
2. Same exact configurations on the ConsumeKafka processor (except consumer group ID) ?
3. Screenshot of scheduling tab for consumeKafka processor?
4. Versions of NiFi (Apache, CFM, HDF) used in both environments?
5. Any observed rebalancing or consumer group related exceptions in the logs?

Having more consumers in a consumer group than the number of partitions can lead to constant rebalance occurring.   The number of consumers in the consumer group is calculated by multiplying the number of nodes in your NiFi cluster by the number of concurrent tasks configured on the ConsumeKafka processor.  So if you have a 3 node cluster, you should have only 1 concurrent task, so number of consumers is equal to or less the the number of partitions.  

Thanks,
Matt

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@hegdemahendra 

Curious about the differences between your prod and uat environments here.
1. Same number of nodes in each environments NiFi cluster?
2. Same exact configurations on the ConsumeKafka processor (except consumer group ID) ?
3. Screenshot of scheduling tab for consumeKafka processor?
4. Versions of NiFi (Apache, CFM, HDF) used in both environments?
5. Any observed rebalancing or consumer group related exceptions in the logs?

Having more consumers in a consumer group than the number of partitions can lead to constant rebalance occurring.   The number of consumers in the consumer group is calculated by multiplying the number of nodes in your NiFi cluster by the number of concurrent tasks configured on the ConsumeKafka processor.  So if you have a 3 node cluster, you should have only 1 concurrent task, so number of consumers is equal to or less the the number of partitions.  

Thanks,
Matt

avatar
Master Collaborator

Thanks for the quick reply @MattWho .
We found the issue.

It was due to firewall setup for the partition-2 on broker side.
When they fixed it started working