Skip to content

Conversation

@mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Nov 3, 2025

Release notes

Fixes the bug where with config_mode => 'advanced', event hub-specific settings (initial_position, max_batch_size, prefetch_count, receive_timeout, initial_position_look_back) were being ignored and replaced with global defaults. These settings are now correctly applied per event hub

What does this PR do?

When using config_mode => 'advanced' and hub-specific settings (initial_position, max_batch_size, prefetch_count, receive_timeout, initial_position_look_back) in each event_hubs entry, those settings were ignored and replaced with global defaults.
This PR correctly applies settings per event hub considering the global params.

Why is it important/What is the impact to the user?

User who use config_mode => 'advanced' and event_hubs entry settings such as initial_position, max_batch_size, prefetch_count, receive_timeout and initial_position_look_back, they do not experience expected behaviour that individual settings will not be applied, instead they are replaced by global settings.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@mashhurs mashhurs added the bug Something isn't working label Nov 3, 2025
@mashhurs mashhurs marked this pull request as ready for review November 3, 2025 22:04
options.setMaxBatchSize(max_batch_size)
options.setPrefetchCount(prefetch_count)
options.setReceiveTimeOut(Duration.ofSeconds(receive_timeout))
options.setMaxBatchSize(event_hub['max_batch_size'])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
end
it_behaves_like "an exploded Event Hub config", 1
it "it explodes the 2cnd advanced config event hub correctly" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why there are 3 sets of event hubs defined here, but only 2 verified?

I think this is leading to missing testing some of the override settings, as the tests are done against the "no overriden settings" event hub and the "partially overriden settings" event hub - eg prefetch_count and initial_position_lookback only ever test the top-level setting, and not an individual event hub override.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why there are 3 sets of event hubs defined here, but only 2 verified?

First entry (index is 0) is verified in it_behaves_like "an exploded Event Hub config", 1

prefetch_count (30) and initial_position_look_back (50) are different in first entry. 2nd and 3rd entries are using global 'prefetch_count' => 250 and 'initial_position_look_back' => 7200 settings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you. Missed that completely

Copy link

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me.

Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mashhurs mashhurs merged commit 3fd7053 into main Nov 4, 2025
4 checks passed
@mashhurs mashhurs deleted the fix-advanced-config-mode-params branch November 4, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] With config_mode => "advanced" mode, plugin doesn't consider initial_position from event_hubs entries.

4 participants