Class GrpcHeaderFilterStrategy

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

The default of the gRPC component. An endpoint's
headerFilterStrategy=#name replaces it; derive from it to add to it.

A producer sends every exchange header but the component's own redbGrpc.* and null values as call metadata
and, in envelope mode, as envelope headers; a consumer's reply envelope carries the same. A consumer brings every
request metadata entry and envelope header in, and a producer every reply envelope header.


Whatever the strategy: HTTP/2 pseudo-headers and grpc-* entries are the protocol's own; a caller's header
with a transport-reserved prefix (redbGrpc., redbHttp....) is dropped on the way in unless
allowClientReservedHeaders=true; a metadata key gRPC cannot express is not sent; the consumer's
redbGrpc.* call metadata, the envelope's Content-Type and the redbGrpc.Trailer.* trailers are
set by the component; trace context is written by the telemetry layer.

public class GrpcHeaderFilterStrategy : IHeaderFilterStrategy

Inheritance

Object→GrpcHeaderFilterStrategy

Implements

Properties

Default

The default strategy of a gRPC endpoint.

public static GrpcHeaderFilterStrategy Default { get; }

Methods

FilterIncoming(string, object?, IExchange)

Whether the header name of an incoming message (a consumed message, a producer's reply) is

public virtual bool FilterIncoming(string name, object? value, IExchange exchange)

FilterOutgoing(string, object?, IExchange)

Whether the exchange header name is dropped instead of going into an outgoing message

public virtual bool FilterOutgoing(string name, object? value, IExchange exchange)