How it works
From a change in an app to an event other systems can rely on.
- 1
Declare
An app lists the events it publishes in config/events.rb: a name, a version and the fields each carries.
- 2
Publish
Inside the transaction that made the change, the app calls publish. The event goes into a short-lived send queue in the app's own database.
- 3
Send
After the transaction commits, a background job sends the queue to IntegrationsByScott in batches and clears each event once it is received.
- 4
Check
The service checks each event against the declaration, the loop limit and the app's own accounts, and records it with its causation chain.
- 5
Act
Subscribers receive it as a signed webhook, and later versions run integrations on it.