Path: redb-route/redb.Route.Amqp/AmqpHeaders.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.Amqp/AmqpHeaders.cs
----
namespace redb.Route.Amqp;
///
/// Well-known header constants used by the AMQP 1.0 component.
/// Headers prefixed with redbAmqp. carry broker metadata on incoming messages.
///
public static class AmqpHeaders
{
/// Common prefix for redb-specific AMQP envelope headers (transport metadata).
public const string Prefix = "redbAmqp.";
// ── Standard AMQP 1.0 properties (well-known names → BARE, self-documenting) ──
// Sections `Properties` and `Header`. Bare names mean no docs needed and a
// consume→produce round-trip carries them through — same convention as the RabbitMQ
// component. Caveat: common-word names (Subject/Priority/…) can collide with a
// business header of the same name.
/// AMQP message-id property.
public const string MessageId = "MessageId";
/// AMQP correlation-id property.
public const string CorrelationId = "CorrelationId";
/// AMQP reply-to property.
public const string ReplyTo = "ReplyTo";
/// AMQP content-type property.
public const string ContentType = "ContentType";
/// AMQP content-encoding property.
public const string ContentEncoding = "ContentEncoding";
/// AMQP subject property.
public const string Subject = "Subject";
/// AMQP to property.
public const string To = "To";
/// AMQP user-id property (binary on the wire).
public const string UserId = "UserId";
/// AMQP group-id property.
public const string GroupId = "GroupId";
/// AMQP group-sequence property.
public const string GroupSequence = "GroupSequence";
/// AMQP reply-to-group-id property.
public const string ReplyToGroupId = "ReplyToGroupId";
/// AMQP creation-time property.
public const string CreationTime = "CreationTime";
/// AMQP absolute-expiry-time property.
public const string AbsoluteExpiryTime = "AbsoluteExpiryTime";
/// Whether the message is durable (header.durable).
public const string Durable = "Durable";
/// Message priority (header.priority).
public const string Priority = "Priority";
/// TTL in milliseconds (header.ttl).
public const string Ttl = "Ttl";
// ── Envelope / transport metadata (no standard property name → redb-prefixed, read-only) ──
/// AMQP address the message was received from.
public const string Address = "redbAmqp.Address";
/// Delivery count (header.delivery-count).
public const string DeliveryCount = "redbAmqp.DeliveryCount";
/// Whether first-acquirer flag was set.
public const string FirstAcquirer = "redbAmqp.FirstAcquirer";
/// Sender settle mode used for this link.
public const string SenderSettleMode = "redbAmqp.SenderSettleMode";
/// Receiver settle mode used for this link.
public const string ReceiverSettleMode = "redbAmqp.ReceiverSettleMode";
/// Returns true if the header key belongs to the AMQP component.
public static bool IsRedbHeader(string key) =>
key.StartsWith(Prefix, StringComparison.OrdinalIgnoreCase);
}