You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(query, topic): add TX lifecycle hooks and refactor tx-topic APIs
- Introduce TX.onCommit, TX.onRollback, and TX.onClose lifecycle hooks
(replaces registerPrecommitHook). Hooks receive AbortSignal where relevant.
- Execute commit hooks before commit, rollback hooks on errors, and close hooks in finally.
- Refactor Topic TX APIs to be tx-first:
- createTxReader(tx, options) and createTxWriter(tx, options); options no longer includes tx.
- Topic TX Reader registers a commit hook to update read offsets in the transaction.
- Update _update_offsets_in_transaction signature to (tx, driver, consumer, updates).
- Adjust e2e tests to the new API and parameter order.
BREAKING CHANGE:
- TopicClient.createTxReader and createTxWriter now accept (tx, options) instead of options with tx.
- TX.registerPrecommitHook is removed; use tx.onCommit, tx.onRollback, and tx.onClose instead.
Signed-off-by: Vladislav Polyakov <[email protected]>
0 commit comments