# changmingxie/tcc-transaction

tcc-transaction是TCC型事务java实现

Repository: https://github.com/changmingxie/tcc-transaction
Canonical: https://ross.abutalabs.com/products/tcc-transaction
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2025-01-24T07:50:02+00:00

## Health v2 (maintenance only)
Score: 24/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 3, release rhythm 8, longevity 100
- inputs: {"age_days": 3924, "days_push": 586, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5759, forks 2749 (observed 2026-08-28T04:09:29.280066+00:00)

## What it is
tcc-transaction is a Java framework implementing TCC (Try-Confirm-Cancel) distributed transactions for microservice architectures. It coordinates multi-service, multi-database operations to achieve eventual consistency through resource reservation, confirmation, and cancellation phases with retry support.

## Use cases
- ensure consistency when a payment refund spans multiple merchant accounts in different databases
- coordinate multi-service transactions in a microservices architecture
- implement try-confirm-cancel compensation logic across services
- roll back partial failures when one service call fails mid-workflow
- add distributed transaction support to a Java Spring microservices project

## When to choose
- you need strong eventual consistency across multiple services and databases in a JVM microservices stack
- your business logic can naturally be split into resource reservation (Try), commit (Confirm), and rollback (Cancel) steps
- you are building payment, refund, or ledger-style flows requiring atomic multi-account operations

## When to avoid
- your services share a single database where local ACID transactions suffice
- you cannot make Confirm/Cancel operations idempotent
- you are not on the JVM or unwilling to add TCC boilerplate to business code
- you prefer simpler saga or message-driven eventual consistency patterns

## Facets
- artifact type: framework
- maturity: stable
- function: microservices, middleware, database, workflow-automation
- domain: microservices, backend, databases, fintech
- platform: jvm, cross-platform
- tags: tcc, distributed-transactions, saga-alternative, eventual-consistency, spring-integration, payment-systems

## Member repositories
- changmingxie/tcc-transaction (main) score 24

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.280066+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:53:15.267738+00:00, confidence not recorded.
  - readme: https://github.com/changmingxie/tcc-transaction (fetched 2026-08-28T04:09:29.280066+00:00, sha 407f32a2c7c3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
