fix: BeginAtEarliest/BeginAtLatest drops GroupId from transport-level ConsumerConfig#3174
Merged
jeremydmiller merged 1 commit intoJun 22, 2026
Conversation
… ConsumerConfig GetEffectiveConsumerConfig() already inherited BootstrapServers from the parent transport config, but not GroupId. When BeginAtEarliest() or BeginAtLatest() was called on a per-listener KafkaListenerConfiguration, it created a fresh per-topic ConsumerConfig with only AutoOffsetReset set. GetEffectiveConsumerConfig() would then return that sparse config, which has no GroupId, causing Confluent.Kafka to throw "group.id configuration parameter is required" at startup. Add GroupId inheritance in GetEffectiveConsumerConfig() using the same pattern already used for BootstrapServers. Add three unit tests covering the fix.
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in the Kafka transport where calling KafkaListenerConfiguration.BeginAtEarliest() / BeginAtLatest() could result in a per-topic ConsumerConfig missing GroupId, causing Confluent.Kafka startup failures (group.id is required).
Changes:
- Update
KafkaTopic.GetEffectiveConsumerConfig()to inheritGroupIdfrom the parent transport when a topic-levelConsumerConfigexists but has noGroupId. - Add unit tests covering
BeginAtEarliest()/BeginAtLatest()inheritance ofGroupIdand ensuring an explicitly configured per-topicGroupIdis not overridden.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Transports/Kafka/Wolverine.Kafka/KafkaTopic.cs | Ensures topic-level consumer configs inherit GroupId from the parent transport when missing. |
| src/Transports/Kafka/Wolverine.Kafka.Tests/KafkaTransportTests.cs | Adds regression tests validating BeginAtEarliest/Latest behavior and GroupId inheritance semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jun 23, 2026
Closed
This was referenced Jul 9, 2026
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
KafkaListenerConfiguration.BeginAtEarliest()/BeginAtLatest()call:This creates a fresh per-topic
ConsumerConfigwith onlyAutoOffsetResetset.KafkaTopic.GetEffectiveConsumerConfig()then returns this sparse config — it alreadycopied
BootstrapServersfrom the parent, but notGroupId. Confluent.Kafka requiresgroup.idand throws at startup:This is a breaking change introduced with the
BeginAtEarliest()/BeginAtLatest()methods added in 6.13.x (GH-3146).
Root cause
GetEffectiveConsumerConfig()inKafkaTopic.cs:Fix
Add
GroupIdinheritance immediately afterBootstrapServers, using the same pattern:Tests
Three new unit tests in
KafkaListenerConfigurationTests:begin_at_earliest_inherits_group_id_from_parent_transport— verifies GroupId + AutoOffsetReset.Earliest + BootstrapServers are all present after.BeginAtEarliest()begin_at_latest_inherits_group_id_from_parent_transport— same for.BeginAtLatest()begin_at_earliest_does_not_override_explicitly_set_group_id— verifies a per-topic GroupId set viaConfigureConsumeris not overwrittenWorkaround (for users who cannot wait for a fix release)
Use
ExtendConsumerConfigurationinstead ofBeginAtEarliest():