Class As2Builder

Assembly: redb.Route.As2.dll

Fluent builder for AS2 endpoint URIs. Builds a string consumed by .

Receive: as2:/path?host=..&port=.. — host/port as query, the path kept intact (no first-segment
truncation, mirroring the Http listener fix). Send: as2[s]://host[:port]/path — HTTPS maps to the
as2s scheme.

public sealed class As2Builder

Inheritance

Object→As2Builder

Methods

AsyncMdnPoolSize(int)

Receive endpoint: how many asynchronous MDNs are handled at once (default 20); a message asking for one when

public As2Builder AsyncMdnPoolSize(int size)

AsyncMdnRetry(int, int)

Receive endpoint: an asynchronous MDN is posted at most attempts times (default 3), the first

public As2Builder AsyncMdnRetry(int attempts, int delayMs)

Build()

Builds the AS2 URI string.

public string Build()

ConnectionFactory(string)

Reference a named from the registry instead of inline config.

public As2Builder ConnectionFactory(string name)

Host(string)

Bind host for the receive server (consumer only).

public As2Builder Host(string host)

IdempotentRepository(string)

Receive endpoint: a named IIdempotentRepository that remembers received Message-IDs, so a resend is not delivered twice.

public As2Builder IdempotentRepository(string name)

InFlightClaimTimeout(int)

Receive endpoint, with an idempotent repository: milliseconds after which an unconfirmed claim of a Message-ID is

public As2Builder InFlightClaimTimeout(int milliseconds)

MaxConcurrentRequests(int, int?)

Admission limit (receive endpoint): at most max concurrent pipeline

public As2Builder MaxConcurrentRequests(int max, int? queue = null)

MaxDecompressedSize(long)

Receive endpoint: the most bytes a compressed message may inflate to; past it the message is refused with

public As2Builder MaxDecompressedSize(long bytes)

MaxRequestBodySize(long)

Receive endpoint: the largest request body accepted, in bytes (default 100 MB); larger is answered 413.

public As2Builder MaxRequestBodySize(long bytes)

MaxResponseBodySize(long)

Send endpoint: the largest response (synchronous MDN) read, in bytes (default 4 MB).

public As2Builder MaxResponseBodySize(long bytes)

Port(int)

Listen port for the receive server (consumer only).

public As2Builder Port(int port)

RejectStatusCode(int)

Status code of a refused request: shed, or every asynchronous MDN slot taken (default 503).

public As2Builder RejectStatusCode(int statusCode)

RetryAfterSeconds(int)

Retry-After value of a refused request in seconds; 0 = do not send (default 30).

public As2Builder RetryAfterSeconds(int seconds)

StreamBody(bool)

Receive endpoint: hand the payload to the route as a spooled Stream instead of byte[].

public As2Builder StreamBody(bool streamBody = true)

Tls(string?, string?)

Serve the receive endpoint over TLS. The certificate is the one presented to the trading

public As2Builder Tls(string? certPath = null, string? certPassword = null)

ToString()

Returns a string that represents the current object.

public override string ToString()