Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.04 KB

DynamoInbox.md

File metadata and controls

36 lines (28 loc) · 1.04 KB

Dynamo Inbox

Usage

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

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

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

private static void ConfigureBrighter(HostBuilderContext hostContext, IServiceCollection services)
{
	var dynamoDb = new AmazonDynamoDBClient(credentials, new AmazonDynamoDBConfig { ServiceURL = "http://dynamodb.us-east-1.amazonaws.com"; });

	services.AddServiceActivator(options =>
	{ ...  })
	.UseExternalInbox(
		new DynamoDbInbox(dynamoDb);
		new InboxConfiguration(
		scope: InboxScope.Commands,
		onceOnly: true,
		actionOnExists: OnceOnlyAction.Throw
		)
	);
}

...