Introduction

transactional_outbox is a thread-safe implementation of the transactional outbox patter. There are both an event creation and an event relay functionality. It doesn't require Rails.

Requirements

ruby >= 3.2

Installation

  1. Add this line to your application's Gemfile:
gem 'transactional_outbox'
  1. Execute:

    $ bundle install

Or install it yourself as:

$ gem install transactional_outbox

Using

  1. Configure it (see configuration).

  2. Generate migrations (if you're using Rails) or use template from here and migrate it:

$ rails g transactional_outbox:migration
$ rails db:migrate
  1. Define your own events (see events creation).

  2. Run event relay (see event relay) with rake task (if needed):

$ rake event_relay:run

Or run it directly like here:

TransactionalOutbox::Relay::Runner.start

Architecture

Architecture

Documentation

Documentation

Contributing

Bug reports and pull requests are welcome here. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the TransactionalOutbox project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.