Optionaloptions: DatabaseInboxStoreOptions
The inbox entity and the database connection
A factory the messaging plugin resolves in onInit
import { createDatabaseInboxStore, DatabasePlugin } from '@setu-ts/database-plugin';
import { MessagingPlugin } from '@setu-ts/messaging-plugin';
import { SchedulerPlugin } from '@setu-ts/scheduler-plugin';
const app = createApplication({
plugins: [
DatabasePlugin({ type: 'memory' }),
SchedulerPlugin(),
MessagingPlugin({ inbox: { store: createDatabaseInboxStore() } }),
],
});
Builds the inbox store bridge as a
RegistryFactory, for the messaging plugin'sinbox.storeoption.The factory resolves
CAPABILITIES.DATABASE(ordatabase.<name>) from the registry it is handed — typed asIDatabaseService, the token's documented interface — and returns anIInboxStoreover it. The messaging plugin resolves it inonInit, soDatabasePluginmay be registered before or after the messaging plugin, and runsverify()there.Per backend. Memory, Prisma, Drizzle (with the inbox table in
drizzleTables), D1, a MongoDB replica set and DynamoDB are supported.verify()refuses Cosmos DB, Bigtable, a standalone MongoDB and a missing or unreadable entity, each by name with anInboxStoreUnavailableError.