Class RouteConfigurationBuilder

Namespace: redb.Route.Core
Assembly: redb.Route.dll

Base class for route configurations (Apache Camel's RouteConfigurationBuilder): error handling declared
once, apart from the routes, for the routes of every builder of the context. It is a route builder, so it is added
to a context the same way — context.AddRoutes(...), or found by assembly discovery.

public sealed class IntegrationErrors : RouteConfigurationBuilder
{
protected override void Configuration()
{
// No id: the default, for every route that has no configurations assigned.
RouteConfiguration()
.OnException<Exception>()
.MaximumRedeliveries(3)
.Handled()
.Log("failed: ${exception.message}");

// By id: for the routes that say .RouteConfigurationId("audit").
RouteConfiguration("audit")
.OnException<IOException>().Handled().To("direct://audit-failed");
}
}

context.AddRoutes(new IntegrationErrors());

public abstract class RouteConfigurationBuilder : RouteBuilder, IRouteBuilder

Inheritance

Object→RouteBuilder→RouteConfigurationBuilder

Implements

Inherited Members

Methods

Configuration()

Override this method to declare the configurations with .

protected abstract void Configuration()

Configure()

Runs . A configuration builder may also define routes by overriding this and calling the base.

protected override void Configure()