/spring-message-outbox

Outbox pattern implementation for Spring

Primary LanguageJavaApache License 2.0Apache-2.0

Spring Message Outbox Build Maven Central

Coverage Security Rating Vulnerabilities

Spring Message Outbox is a library that implements the outbox pattern for Spring Boot. This library is currently in an ALPHA state and in heavy development. It is not advisable to use this library in production. Contributions or bug reports are welcome.

Usage

  • Add outbox-core as a dependency and import its configuration class into a Spring configuration class using @Import (don't name your config bean OutboxConfiguration as it will conflict).
  • Add a storage module as a dependency and import its configuration class into a Spring configuration class using @Import
  • Add a publisher module as a dependency and import its configuration class into a Spring configuration class using @Import
  • Autowire the Outbox class and publish messages using outbox.publish().

Core Module

  • Core Module - Implements the core workflow of the outbox pattern.

Storage Modules

Storage modules implement the OutboxMessageRepository interface and provide persistence for the outbox messages before they are published.

Publisher Modules

Publisher modules implement the OutboxMessagePublisher interface and provide a mechanism to publish outbox messages on a specific message channel.