Croway opened a new pull request, #30173: URL: https://github.com/apache/camel/pull/30173
JIRA: [CAMEL-27022](https://issues.apache.org/jira/browse/CAMEL-27022) - With `groupInstanceId` and `consumersCount` greater than 1, every consumer thread got the same `group.instance.id`. A static member id is allowed once in a group, so the consumers fenced each other in a loop (`FencedInstanceIdException`) and the group never had more than one member. - `KafkaConsumer.getProps(int)` now gives the consumer with index n the id `<groupInstanceId>-n` (`pod-1-0`, `pod-1-1`, ...) when `consumersCount` is greater than 1, as Kafka Streams does for its stream threads. This also applies to `additionalProperties.group.instance.id`, and each consumer gets its own derived `client.id`. - With `consumersCount=1` the id is used as given, so an existing static member keeps its identity. - The `groupInstanceId` and `consumersCount` descriptions say how the consumers join the group; `kafka.json`, its catalog copy and the endpoint and component DSL are regenerated. Tests: `KafkaConsumerGroupInstanceIdTest` (the two tests with more than one consumer fail on main, where every consumer gets `pod-1`, and pass with the fix; the two controls pass both ways). `KafkaConsumerGroupInstanceIdIT` (Kafka container, 3 partitions, 3 consumers): the group reaches the static members `camel-0`, `camel-1` and `camel-2` and consumes a record from each partition; on main the members fence each other and the test times out. camel-kafka unit tests: 307 run, 0 failures. Upgrade guide: "camel-kafka - each consumer of consumersCount gets its own group instance id" in `camel-4x-upgrade-guide-4_24.adoc`. _Claude Code on behalf of Federico Mariani_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
