Class SqlEndpointOptions

Namespace: redb.Route.Sql
Assembly: redb.Route.Sql.dll

Options for the SQL endpoint. Inherits for automatic
URI parameter binding via .

This is the single source of truth — both Fluent API ()
and URI strings converge here through BindFromUri().

public sealed class SqlEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→SqlEndpointOptions

Inherited Members

Properties

AsFunction

Call as a function (SELECT function_name(...)) instead of EXEC/CALL.

public bool AsFunction { get; set; }

BackslashEscapes

Inside '…' and "…" of a statement a backslash escapes the next character, as MySQL and MariaDB read them

public bool BackslashEscapes { get; set; }

BatchSize

Batch mode for the producer. A value above zero makes a list body a batch: the statement runs once per item and all

public int BatchSize { get; set; }

BreakBatchOnError

What a failing batch item does.

public bool BreakBatchOnError { get; set; }

CommandTimeout

Command execution timeout in seconds. Default: 30.

public int CommandTimeout { get; set; }

ConnectionString

Direct connection string (used if is not set).

public string? ConnectionString { get; set; }

DataSource

Named DataSource from the registry (configured via AddDataSource). redb or redb:<name>: the

[RegistryReference(typeof(ISqlConnectionFactory))]
public string? DataSource { get; set; }

Delay

Delay between polls in milliseconds. Default: 500.

public int Delay { get; set; }

FixedRate

Fixed-rate polling (delay is measured from start of poll, not end).

public bool FixedRate { get; set; }

InitialDelay

Initial delay before the first poll in milliseconds. Default: 1000.

public int InitialDelay { get; set; }

IsolationLevel

Transaction isolation level. Null = provider default.

public IsolationLevel? IsolationLevel { get; set; }

MaxMessagesPerPoll

Maximum rows to process per poll. -1 = unlimited.

public int MaxMessagesPerPoll { get; set; }

Mode

Operating mode: Poll (consumer), Execute (producer), Procedure (producer).

public SqlMode Mode { get; set; }

Noop

Dry-run mode: logs the query without executing it.

public bool Noop { get; set; }

OnBatchComplete

SQL to execute after the entire batch is processed.

public string? OnBatchComplete { get; set; }

OnFailure

SQL to execute when processing a row fails.

public string? OnFailure { get; set; }

OnFailureAfterRollback

With : keep the mark of a failed row. By default (false) a failure

public bool OnFailureAfterRollback { get; set; }

OnSuccess

SQL to execute after each row is successfully processed.

public string? OnSuccess { get; set; }

OutputClass

POCO type name for . Null = Dictionary mapping.

public string? OutputClass { get; set; }

OutputHeader

If set, result goes to this header instead of the Exchange body.

public string? OutputHeader { get; set; }

OutputType

How the result set is mapped to the Exchange body. The default, , is decided by what the

public SqlOutputType OutputType { get; set; }

PlaceholderStyle

How the :#name placeholders of a statement are written for the provider:

public SqlPlaceholderStyle PlaceholderStyle { get; set; }

PollDelivery

How polled rows reach the route. (the default): an exchange per row.

public SqlPollDelivery PollDelivery { get; set; }

ProcedureName

Stored procedure or function name (for ).

public string? ProcedureName { get; set; }

ProcedureParams

Serialized procedure parameter definitions.

public string? ProcedureParams { get; set; }

Provider

ADO.NET provider name (e.g. "Microsoft.Data.SqlClient", "Npgsql").

public string? Provider { get; set; }

Query

SQL query or ref:name reference to a named query.

public DynamicValue<string>? Query { get; set; }

ReadOnly

Runs the statement on the data source's read replica (),

public bool ReadOnly { get; set; }

RepeatCount

Maximum number of poll cycles. 0 = unlimited.

public long RepeatCount { get; set; }

RouteEmptyResultSet

Create an Exchange even when the result set is empty.

public bool RouteEmptyResultSet { get; set; }

SendEmptyMessageWhenIdle

Send an empty message when there is nothing to poll (idle notification).

public bool SendEmptyMessageWhenIdle { get; set; }

Transacted

Whether to wrap execution in a .

public bool Transacted { get; set; }

Methods

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()