Class OutboxBuilderOracleExtensions
Extension methods for configuring Oracle provider on IOutboxBuilder.
public static class OutboxBuilderOracleExtensions
- Inheritance
-
OutboxBuilderOracleExtensions
- Inherited Members
Remarks
These extensions provide fluent provider selection by adding provider-specific configuration to the core IOutboxBuilder interface. Connection is configured via the builder using ConnectionString(string) or ConnectionFactory(Func<IServiceProvider, IDb>).
Methods
UseOracle(IOutboxBuilder, Action<IOracleOutboxBuilder>)
Configures the outbox to use Oracle as the storage provider.
public static IOutboxBuilder UseOracle(this IOutboxBuilder builder, Action<IOracleOutboxBuilder> configure)
Parameters
builderIOutboxBuilderThe outbox builder.
configureAction<IOracleOutboxBuilder>Action to configure Oracle-specific options including connection.
Returns
- IOutboxBuilder
The builder for fluent chaining.
Examples
// Connection string
services.AddExcalibur(x => x.AddOutbox(outbox =>
{
outbox.UseOracle(oracle =>
{
oracle.ConnectionString(connectionString)
.SchemaName("messaging")
.TableName("outbox_messages")
.ReservationTimeout(TimeSpan.FromMinutes(10))
.MaxAttempts(5);
})
.EnableBackgroundProcessing();
}));
// IDb factory
services.AddExcalibur(x => x.AddOutbox(outbox =>
{
outbox.UseOracle(oracle =>
{
oracle.ConnectionFactory(sp => sp.GetRequiredService<IDb>())
.SchemaName("messaging");
})
.EnableBackgroundProcessing();
}));
Remarks
This is the primary method for configuring Oracle as the outbox storage provider. It registers the OracleOutboxStore and related services. Connection can be provided via the builder using ConnectionString(string) or ConnectionFactory(Func<IServiceProvider, IDb>).
Exceptions
- ArgumentNullException
Thrown when
builderorconfigureis null.