Skip to content

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

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
…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 <soby.chacko@broadcom.com>
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