Skip to content

Narrow ContainerProperties#transactionManager type to KafkaAwareTransactionManager #3054

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

Closed
Wzy19930507 opened this issue Feb 21, 2024 · 1 comment

Comments

@Wzy19930507
Copy link
Contributor

Wzy19930507 commented Feb 21, 2024

From #2775

Setting a Jpa transaction manager on the container is not really recommended; this is for a KafkaAwareTransactionManager, to properly manage Kafka transactions.

Yes, on reflection, it should only accept the narrower type; we can deprecate the old setter.

Deprecated ContainerProperties#transactionManager and add new properties ContainerProperties#kafkaTransactionManager type is KafkaAwareTransactionManager.

If change transactionManager type to KafkaAwareTransactionManager, old version KafkaMessageListenerContainer earlyRecordInterceptorandearlyRecordInterceptorwill invalid. For compatibility, add new propertieskafkaTransactionManager`.

Other transaction manager can migration to @Transactional, see https://docs.spring.io/spring-kafka/reference/3.2/kafka/transactions.html#transaction-synchronization.

@Wzy19930507
Copy link
Contributor Author

dump with #2775

@Wzy19930507 Wzy19930507 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant