Skip to content

basalt / events-sqlite/src / sqliteOutboxStore

Function: sqliteOutboxStore() ​

> sqliteOutboxStore(dbOrLocation?): SqliteOutboxStores

Defined in: events-sqlite/src/index.ts:217

Open a database (or reuse a DatabaseSync) and return the outbox store wired to it, named to drop straight into outboxPlugin:

ts
const outbox = sqliteOutboxStore('./data/outbox.db')
outboxPlugin({ store: outbox.store, dispatch, captureEvents: ['order.*'], intervalMs: 1000 })

Parameters ​

dbOrLocation? ​

string | DatabaseSync

Returns ​

SqliteOutboxStores

Released under the MIT License.