Skip to content

Add spring-outbox-kt — Transactional Outbox for Spring Boot#1131

Open
BK202503 wants to merge 1 commit into
Heapy:mainfrom
BK202503:add-spring-outbox-kt
Open

Add spring-outbox-kt — Transactional Outbox for Spring Boot#1131
BK202503 wants to merge 1 commit into
Heapy:mainfrom
BK202503:add-spring-outbox-kt

Conversation

@BK202503

@BK202503 BK202503 commented Jun 6, 2026

Copy link
Copy Markdown

Adds BK202503/bk-spring-outbox under category(\"Libraries/Frameworks\") { subcategory(\"Web\") { ... } } in Libraries.awesome.kts, alongside the existing run of Spring-microservice entries.

What it is

Transactional Outbox for Spring Boot as a single OutboxPublisher injection inside @Transactional:

@Transactional
fun createOrder(req: CreateOrderRequest): Order {
    val order = orderRepo.save(req.toOrder())
    outbox.publish(
        topic = \"orders\",
        aggregateType = \"Order\",
        aggregateId = order.id,
        eventType = \"OrderCreated\",
        payload = mapper.writeValueAsBytes(OrderCreated(order)),
    )
    return order
}
  • Same DB transaction wraps the business write and the outbox row → atomic.
  • Coroutine-based relay polls the table after commit and forwards each event to Kafka.
  • PostgreSQL uses SELECT … FOR UPDATE SKIP LOCKED so multiple relay replicas don't double-publish.
  • Kafka records carry outbox_event_id for downstream dedupe and aggregateId as the record key for strict per-aggregate ordering.

Project signals

  • Apache-2.0 license
  • Public on GitHub, v0.1.0 released 2026-06-06
  • JitPack v0.1.0 builds green
  • CI runs the full suite including PostgreSQL via testcontainers
  • README with motivation, install, comparison, observability section, pairing recipe with spring-saga-kt

Why it fits this list

There is no Kotlin-native, Spring Boot autoconfigure-driven Transactional Outbox library in the ecosystem today. Existing options (Eventuate Tram, Debezium CDC pipelines) are Java-first or require a separate runtime. This sits naturally next to the existing Spring-microservice entries.

Checklist

  • OSI-approved license (Apache-2.0)
  • Public GitHub release (v0.1.0)
  • Added in the matching subcategory next to similar Spring entries
  • Description under 200 chars, follows the surrounding format
  • Tags consistent with neighbors

Repo: https://github.com/BK202503/bk-spring-outbox
Release: https://github.com/BK202503/bk-spring-outbox/releases/tag/v0.1.0

Kotlin-first, coroutine-native Transactional Outbox for Spring Boot —
fills the gap of no Kotlin-native, autoconfigured outbox library in
the ecosystem. Pairs with the existing run of Spring-microservice
entries in the Web subcategory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant