Class GrpcEndpointOptions

Namespace: redb.Route.Grpc
Assembly: redb.Route.Grpc.dll

Options for the gRPC endpoint. Shared by both producer and consumer.
Use URI parameters to configure: grpc:host:port/service/method?deadline=30000

public class GrpcEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→GrpcEndpointOptions

Inherited Members

Properties

AllowClientReservedHeaders

Accept caller-supplied headers that carry a transport-reserved prefix (redbGrpc.,

public bool AllowClientReservedHeaders { get; set; }

AllowedClientThumbprints

Comma-separated thumbprints of accepted client certificates. When set, a presented certificate

public string? AllowedClientThumbprints { get; set; }

ClientCertificateMode

Client-certificate policy (mTLS). Requires .

public GrpcClientCertificateMode ClientCertificateMode { get; set; }

ClientCertPassword

Password for .

public string? ClientCertPassword { get; set; }

ClientCertPath

Path to a PFX client certificate presented to the server (mTLS, producer side).

public string? ClientCertPath { get; set; }

Compression

Reply compression. Requests are decompressed regardless of this setting (we advertise

public GrpcCompression Compression { get; set; }

ConnectionFactory

Named from the route registry. Lets the TLS certificate

[RegistryReference(typeof(GrpcConnectionFactory))]
public string? ConnectionFactory { get; set; }

Deadline

Deadline (timeout) in milliseconds. Default: 30000 (30s). 0 = no deadline.

public int Deadline { get; set; }

DeadlineExpression

Expression override for deadline (resolves to int milliseconds).

public string? DeadlineExpression { get; set; }

EmitHttpCompatHeaders

Mirror the resolved client address into redbHttp.RemoteAddress as well, so processors

public bool EmitHttpCompatHeaders { get; set; }

Envelope

Body handling for the consumer. Default: .

public GrpcEnvelopeMode Envelope { get; set; }

HeaderFilterStrategy

A registry reference (#name) to an that

[RegistryReference(typeof(IHeaderFilterStrategy))]
public string? HeaderFilterStrategy { get; set; }

Health

Also serve grpc.health.v1.Health/Check on this host:port, answering SERVING while the

public bool Health { get; set; }

Host

Bind host for the gRPC server. Default: 0.0.0.0.

public string Host { get; set; }

InOut

If true, the consumer returns the exchange Out body as the gRPC response (InOut pattern).

public bool InOut { get; set; }

MaxConcurrentRequests

Maximum concurrent executions of this consumer's pipeline for UNARY calls. 0 (default) =

public int MaxConcurrentRequests { get; set; }

MaxMessageSize

Single knob for all three size limits (send, receive, server request), mirroring camel-grpc's

public int MaxMessageSize { get; set; }

MaxReceiveMessageSize

Max receive message size in bytes. Default: 4 MB. 0 = unlimited.

public int MaxReceiveMessageSize { get; set; }

MaxRequestMessageSize

Max request message size in bytes for the server. Default: 4 MB. 0 = unlimited.

public int MaxRequestMessageSize { get; set; }

MaxSendMessageSize

Max send message size in bytes. Default: 4 MB. 0 = unlimited.

public int MaxSendMessageSize { get; set; }

Method

Method name within , e.g. Token. Parity with camel-grpc's

public string? Method { get; set; }

MethodPath

Full method address this endpoint serves or calls, /package.Service/Method. Taken from the

public string MethodPath { get; set; }

NegotiationType

Channel security, mirroring camel-grpc's negotiationType: PLAINTEXT or TLS.

public string? NegotiationType { get; set; }

Plaintext

Use plaintext (HTTP/2 without TLS). Default: true. Set to false for TLS.

public bool Plaintext { get; set; }

Port

Bind port for the gRPC server. Default: 50051.

public int Port { get; set; }

RejectStatusCode

HTTP status code for a shed request. Default 429 (gRPC clients see an HTTP-level error).

public int RejectStatusCode { get; set; }

RequestQueueLimit

Requests over the limit that WAIT for a permit (FIFO). 0 (default) = reject immediately.

public int RequestQueueLimit { get; set; }

RetryAfterSeconds

Value of the Retry-After header on a shed request; 0 = do not send it. Default 1.

public int RetryAfterSeconds { get; set; }

Service

Fully-qualified service name, e.g. identity.v1.Identity. Parity with camel-grpc, which

public string? Service { get; set; }

Ssl

Enable TLS for the consumer. Default: false (plaintext HTTP/2, i.e. h2c).

public bool Ssl { get; set; }

SslCertPassword

Password for the PFX certificate.

public string? SslCertPassword { get; set; }

SslCertPath

Path to PFX certificate file for TLS. Required when ssl=true.

public string? SslCertPath { get; set; }

Streaming

Serve this address as a server-streaming method: the route's reply may carry many messages and

public bool Streaming { get; set; }

SuppressStatusMapping

Do not translate a route's status.code into a gRPC status; always answer OK and let

public bool SuppressStatusMapping { get; set; }

ThrowOnError

Throw when the call fails, so .OnException(...), retry and dead-letter see it — the same

public bool ThrowOnError { get; set; }

Methods

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()