Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.04 KB

SqliteInbox.md

File metadata and controls

37 lines (27 loc) · 1.04 KB

Sqlite Inbox

Usage

The Sqlite Inbox allows use of Sqlite for Brighter's inbox support. The configuration is described in Basic Configuration.

For this we will need the Inbox packages for the Sqlite Inbox.

  • Paramore.Brighter.Inbox.Sqlite
private static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureServices(hostContext, services) =>
        {
            ConfigureBrighter(hostContext, services);
        }

private static void ConfigureBrighter(HostBuilderContext hostContext, IServiceCollection services)
{
    services.AddServiceActivator(options =>
        { ...  })
        .UseExternalInbox(
            new SqliteInbox(new SqliteInboxConfiguration("DataSource=test.db", "Inbox");
            new InboxConfiguration(
                scope: InboxScope.Commands,
                onceOnly: true,
                actionOnExists: OnceOnlyAction.Throw
            )
        );
}

...