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

KAFKA-19003-Add forceTerminateTransaction command to CLI tools #19276

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

rreddy-22
Copy link
Contributor

@rreddy-22 rreddy-22 commented Mar 24, 2025

This patch is part of KIP-939 Support Participation in 2PC

The kafka-transactions.sh tool will support a new command --forceTerminateTransaction It has one required argument --transactionalId that would take the transactional id for the transaction to be terminated.

The command uses the existing Admin#fenceProducers method to forcefully abort the transaction associated with the specified transactional ID. Under the hood, it sends an InitProducerId request to the transaction coordinator with the given transactional ID and keepPreparedTxn = false by default. This is aligned with the functionality outlined in the KIP.

The only difference is that we WON'T be creating a new public method in the Admin Client public TerminateTransactionResult forceTerminateTransaction(String transactionalId), to re-use existing the existing fence producer method.

@github-actions github-actions bot added triage PRs from the community tools small Small PRs labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs tools triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant