Path: redb-route/redb.Route.IbmMq/IbmMqHeaderFilterStrategy.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.IbmMq/IbmMqHeaderFilterStrategy.cs
----
using redb.Route.Abstractions;
namespace redb.Route.IbmMq;
///
/// The default of the IBM MQ component. An endpoint's
/// headerFilterStrategy=#name replaces it; derive from it to add to it.
///
/// A producer's request and a consumer's reply carry every exchange header but the component's own
/// redbIbmMq.* and null values in the message's header catalogue; a consumed message and a request-reply's
/// reply bring every catalogued header in, on the poll and the XMS receive paths alike. Whatever the strategy, MQMD
/// fields are read from and written to the redbIbmMq.* headers by name, targetClient=Mq sends no
/// catalogue at all, and trace context is written by the telemetry layer.
///
///
public class IbmMqHeaderFilterStrategy : IHeaderFilterStrategy
{
/// The default strategy of an IBM MQ endpoint.
public static IbmMqHeaderFilterStrategy Default { get; } = new();
///
public virtual bool FilterOutgoing(string name, object? value, IExchange exchange)
=> value is null || IbmMqHeaders.IsRedbHeader(name);
///
public virtual bool FilterIncoming(string name, object? value, IExchange exchange) => false;
}