Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bedrock-adam authored Nov 9, 2024
1 parent 94796f6 commit d68d316
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ end
bin/rails g outboxer:publisher
```

### 5. handle event created out of band
### 5. publish message out of band

```ruby
Outboxer::Publisher.publish(...) do |message|
case message[:messageable_type]
when 'Event'
event = Event.find(message[:messageable_id])

# handle event here
EventCreatedJob.perform_async({ 'id' => message[:messageable_id] })
end
end
```
Expand Down

0 comments on commit d68d316

Please sign in to comment.