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
- Add this line to your application's Gemfile:
gem 'transactional_outbox'
-
Execute:
$ bundle install
Or install it yourself as:
$ gem install transactional_outbox
Using
-
Configure it (see configuration).
-
Generate migrations (if you're using Rails) or use template from here and migrate it:
$ rails g transactional_outbox:migration
$ rails db:migrate
-
Define your own events (see events creation).
-
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

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.