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

Abstracting out logic for TransactionManager reflections and direct field access; Disallow >1 backendProducers to be created when PscProducer is transactional #43

Merged
merged 11 commits into from
Aug 27, 2024

Conversation

jeffxiang
Copy link
Contributor

@jeffxiang jeffxiang commented Aug 13, 2024

  1. Create a new utility class TransactionManagerUtils which centralizes and abstracts direct field access and reflections logic for Kafka's TransactionManager so that PSC's references can be backend-agnostic.

  2. PscProducer.send() will throw an exception if the following condition is true: The user is attempting to send a message via an already transactional PscProducer, and if sending the message will result in the creation of an additional backendProducer when one already exists. If the producer is non-transactional at the time of send(), there is no enforcement.

See javadocs for more details.

@jeffxiang jeffxiang requested a review from a team as a code owner August 13, 2024 21:55
@jeffxiang jeffxiang changed the title Abstracting out logic for TransactionManager reflections and direct field access Abstracting out logic for TransactionManager reflections and direct field access; Disallow >1 backendProducers to be created when PscProducer is transactional Aug 26, 2024
@jeffxiang jeffxiang merged commit a9055ab into 3.2 Aug 27, 2024
1 check passed
@jeffxiang jeffxiang deleted the txn_manager_utils branch August 27, 2024 16:12
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.

2 participants