Class HttpConsumer

Namespace: redb.Route.Http
Assembly: redb.Route.Http.dll

HTTP consumer. Uses SharedHttpServerManager to register routes on a shared
Kestrel server instance per (host, port). Multiple consumers can serve
different routes on the same port.
Supports configurable bind address, CORS, allowed methods, HTTPS/TLS,
request body streaming, and InOut exchange patterns for synchronous responses.

public class HttpConsumer : IConsumer

Inheritance

Object→HttpConsumer

Implements

Properties

BaseUrl

The base URL the server is listening on. Available after Start().

public string? BaseUrl { get; }

Endpoint

The endpoint this consumer is attached to (for diagnostics/logging).

public IEndpoint Endpoint { get; }

ProcessedCount

Number of requests successfully processed.

public long ProcessedCount { get; }

Methods

Start(CancellationToken)

Starts consuming messages.

public Task Start(CancellationToken ct = default)

Stop(CancellationToken)

Stops consuming messages.

public Task Stop(CancellationToken ct = default)

Constructors