Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonstreator committed Dec 23, 2023
1 parent e3775b4 commit da81321
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
- `backoff_until` Date nullable
- `processed_at` Date nullable

`txob` exposes an optionally configurable interface into event processing with control over max errors, backoff calculation on error, event update retrying, and logging.
`txob` exposes an optionally configurable interface into event processing with control over maximum allowed errors, backoff calculation on error, event update retrying, and logging.

As per the 'transactional outbox specification', you should ensure your events are transactionally persisted alongside mutations.
As per the 'transactional outbox specification', you should ensure your events are transactionally persisted alongside their related data mutations.

The processor handles graceful shutdown and is horizontally scalable by default with the native client implementatations for [`pg`](./src/pg/client.ts) and [`mongodb`](./src/mongodb/client.ts).

Expand All @@ -48,7 +48,7 @@ The processor handles graceful shutdown and is horizontally scalable by default

### Examples

Let's look at an example of an HTTP API that allows a user to be invited and must send an email on invite.
Let's look at an example of an HTTP API that allows a user to be invited where a email must be sent along with the invite.

```ts
import http from "node:http";
Expand Down Expand Up @@ -77,6 +77,7 @@ const processor = EventProcessor(
UserInvited: {
sendEmail: async (event, { signal }) => {
// find user by event.data.userId to use relevant user data in email sending

// email sending logic

// use the AbortSignal `signal` to perform quick cleanup
Expand Down

0 comments on commit da81321

Please sign in to comment.