Skip to content

Commit

Permalink
doc: talk more about ordering, retried etc. in event-notification.md
Browse files Browse the repository at this point in the history
  • Loading branch information
opqdonut committed Apr 20, 2020
1 parent 6139666 commit 425e04b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/event-notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

REMS can be configured to send events notifications over HTTP.

Event notifications are performed _one at a time_, waiting for a HTTP
200 response from the notification endpoint. Everything except a HTTP
200 response counts as a failure. Failed notifications are retried
with exponential backoff for up to 12 hours.

Due to retries, the event notification endpoint _should be_ idempotent.

Event notifications are _not guaranteed to be ordered_ by event
creation order, especially when retries occur.

Event notification failures are logged. You can also inspect the
`outbox` db table for the retry state of notifications.

## Configuration

See `:event-notification-targets` in [config-defaults.edn](../resources/config-defaults.edn).
Expand All @@ -18,9 +31,3 @@ The body of the HTTP PUT request will be a JSON object that contains:

Other keys may also be present depending on the event type.

## Error handling

Event notifications are retried with exponential backoff for up to 12
hours. Everything except a HTTP 200 status counts as a failure.
Failures are logged. You can also inspect the `outbox` db table for
the retry state of notifications.

0 comments on commit 425e04b

Please sign in to comment.