mirror of
https://github.com/ditkrg/outboxable.git
synced 2026-01-22 22:06:47 +00:00
Updates documentation
This commit is contained in:
parent
92ee8d2eea
commit
3b545b0676
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
outboxable (1.0.2)
|
outboxable (1.0.3)
|
||||||
bunny (>= 2.19.0)
|
bunny (>= 2.19.0)
|
||||||
connection_pool (~> 2.3.0)
|
connection_pool (~> 2.3.0)
|
||||||
|
|
||||||
|
|||||||
22
README.md
22
README.md
@ -1,6 +1,6 @@
|
|||||||
# Outboxable
|
# Outboxable
|
||||||
|
|
||||||
The Outboxable Gem is tailored for Rails applications to implement the transactional outbox pattern. It currently only supports ActiveRecord.
|
The Outboxable Gem is tailored for Rails applications to implement the transactional outbox pattern. It supports both ActiveRecord and Mongoid.
|
||||||
|
|
||||||
Please take into consideration that this Gem is **opinionated**, meaning it expects you to follow a certain pattern and specific setting. If you don't like it, you can always fork it and change it.
|
Please take into consideration that this Gem is **opinionated**, meaning it expects you to follow a certain pattern and specific setting. If you don't like it, you can always fork it and change it.
|
||||||
|
|
||||||
@ -25,13 +25,19 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|||||||
$ gem install outboxable
|
$ gem install outboxable
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run:
|
For use with ActiveRecord, run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ rails g outboxable:install
|
$ rails g outboxable:install --orm activerecord
|
||||||
```
|
```
|
||||||
|
|
||||||
The command above will add a migration file and the Outbox model. You will need then to run the migrations:
|
For use with Mongoid, run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ rails g outboxable:install --orm mongoid
|
||||||
|
```
|
||||||
|
|
||||||
|
The command above will add a migration file and the Outbox model. You will need then to run the migrations (ActiveRecord only):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ rails db:migrate
|
$ rails db:migrate
|
||||||
@ -64,7 +70,7 @@ module Outboxable
|
|||||||
end
|
end
|
||||||
|
|
||||||
Outboxable.configure do |config|
|
Outboxable.configure do |config|
|
||||||
# Specify the ORM you are using. For now, only ActiveRecord is supported.
|
# Specify the ORM you are using. Supported values are :activerecord and :mongoid
|
||||||
config.orm = :activerecord
|
config.orm = :activerecord
|
||||||
|
|
||||||
# Specify the message broker you are using. For now, only RabbitMQ is supported.
|
# Specify the message broker you are using. For now, only RabbitMQ is supported.
|
||||||
@ -208,6 +214,12 @@ Last but not least, run sidekiq so that the Outboxable Gem can publish the event
|
|||||||
$ bundle exec sidekiq
|
$ bundle exec sidekiq
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Mongoid
|
||||||
|
|
||||||
|
The Outboxable gem works smoothly with Mongoid. It is to be noted that when used with Mongoid, Outboxable does not use the `_id` as the idempotency key. It creates a field called ``idempotency_key`` which is a UUID generated at the time of the insertion of the document.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Outboxable
|
module Outboxable
|
||||||
VERSION = '1.0.2'
|
VERSION = '1.0.3'
|
||||||
end
|
end
|
||||||
|
|||||||
@ -23,7 +23,7 @@ Outboxable.configure do |config|
|
|||||||
# Specify the ORM you are using. For now, only ActiveRecord is supported.
|
# Specify the ORM you are using. For now, only ActiveRecord is supported.
|
||||||
config.orm = :activerecord
|
config.orm = :activerecord
|
||||||
|
|
||||||
# Specify the message broker you are using. For now, only RabbitMQ is supported.
|
# Specify the ORM you are using. Supported values are :activerecord and :mongoid
|
||||||
config.message_broker = :rabbitmq
|
config.message_broker = :rabbitmq
|
||||||
|
|
||||||
# RabbitMQ configurations
|
# RabbitMQ configurations
|
||||||
|
|||||||
@ -23,7 +23,7 @@ Outboxable.configure do |config|
|
|||||||
# Specify the ORM you are using. For now, only ActiveRecord is supported.
|
# Specify the ORM you are using. For now, only ActiveRecord is supported.
|
||||||
config.orm = :mongoid
|
config.orm = :mongoid
|
||||||
|
|
||||||
# Specify the message broker you are using. For now, only RabbitMQ is supported.
|
# Specify the ORM you are using. Supported values are :activerecord and :mongoid
|
||||||
config.message_broker = :rabbitmq
|
config.message_broker = :rabbitmq
|
||||||
|
|
||||||
# RabbitMQ configurations
|
# RabbitMQ configurations
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user