Path: redb-route/redb.Route.Sqs/SqsHeaders.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.Sqs/SqsHeaders.cs
----
namespace redb.Route.Sqs;
///
/// Exchange header keys for the SQS transport. All carry the so the producer can
/// tell framework/broker headers apart from user headers it must forward as message attributes.
///
public static class SqsHeaders
{
/// Common prefix for all SQS headers.
public const string Prefix = "redbSqs.";
/// Queue name (or URL) the message was received from / is sent to.
public const string Queue = Prefix + "queue";
/// SQS message id.
public const string MessageId = Prefix + "messageId";
/// Receipt handle — required to delete or change visibility of a received message.
public const string ReceiptHandle = Prefix + "receiptHandle";
/// MD5 of the message body (integrity check).
public const string Md5OfBody = Prefix + "md5OfBody";
/// FIFO message group id.
public const string MessageGroupId = Prefix + "messageGroupId";
/// FIFO deduplication id.
public const string MessageDeduplicationId = Prefix + "messageDeduplicationId";
/// FIFO sequence number assigned by SQS.
public const string SequenceNumber = Prefix + "sequenceNumber";
/// Approximate number of times the message has been received.
public const string ApproximateReceiveCount = Prefix + "approximateReceiveCount";
/// Epoch-millis the message was sent.
public const string SentTimestamp = Prefix + "sentTimestamp";
/// Receive timestamp (epoch millis) set by the consumer.
public const string Timestamp = Prefix + "timestamp";
/// Prefix under which incoming message attributes are exposed as headers.
public const string MessageAttributePrefix = Prefix + "attr.";
/// Producer, list body: the number of messages SQS took from the SendMessageBatch calls.
public const string BatchSuccessful = Prefix + "batchSuccessful";
/// Producer, list body: the number of messages SQS refused; the send does not throw for them.
public const string BatchFailed = Prefix + "batchFailed";
/// Producer, list body: the refused entries (List<string>, "entry id: code message"), set when there are any.
public const string BatchFailedEntries = Prefix + "batchFailedEntries";
/// True if is an SQS framework/broker header (should not be re-sent as a user attribute).
public static bool IsSqsHeader(string header) =>
header.StartsWith(Prefix, StringComparison.Ordinal);
}