Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-3090: Ensure client factory customizers are applied before transac… #3091

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sobychacko
Copy link
Contributor

…tion manager creation

Fixes: #3090

Issue: #3090

Fixes issue where KafkaBinderConfiguration would add customizers after the transaction manager was already created.

The KafkaMessageChannelBinder was initializing the transaction manager in the constructor before client factory customizers were added, which meant the customizers were never applied to the producer factory used by the transaction manager.

  • Moves transaction manager initialization from the constructor to the onInit() method
  • Leverages the existing InitializingBean lifecycle to ensure customizers are applied before the transaction manager is created
  • Adds comprehensive test coverage to verify the fix in the binder and via auto-configuration

…fore transaction manager creation

Fixes: spring-cloud#3090

Issue: spring-cloud#3090

Fixes issue where KafkaBinderConfiguration would add customizers after the
transaction manager was already created.

The KafkaMessageChannelBinder was initializing the transaction manager in the
constructor before client factory customizers were added, which meant the customizers
were never applied to the producer factory used by the transaction manager.

- Moves transaction manager initialization from the constructor to the onInit() method
- Leverages the existing InitializingBean lifecycle to ensure customizers are applied
  before the transaction manager is created
- Adds comprehensive test coverage to verify the fix in the binder and via auto-configuration

Signed-off-by: Soby Chacko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with applying clientFactoryCustomizer when using a transaction producer
2 participants