KubeMQ
ConnectorsAWS (SQS & SNS)Reference

Channel Mapping

How an AWS SQS queue maps to a KubeMQ Queue channel — the sqs.{name} grammar, FIFO message-group encoding, the virtual SNS registry, and the tag codec.

This is the master reference for how the embedded KubeMQ AWS connector maps SQS queues and SNS topics onto KubeMQ. An SQS queue is backed by exactly one KubeMQ Queue channel; an SNS topic is virtual — a registry entry whose publish fans out to subscribed queues and webhooks.

SQS queue grammar

Every SQS queue maps to exactly one KubeMQ Queue channel:

sqs.{name}
└┬─┘ └──┬──┘
 │      └─ the SQS queue name (the same name you pass to CreateQueue)
 └─ fixed connector prefix
SQS queueKubeMQ channel
orderssqs.orders
eventssqs.events
work-dlqsqs.work-dlq

FIFO group grammar

A FIFO queue {name}.fifo fans each message group onto its own per-group channel:

sqs.{name}.fifo.g.{enc(group)}
└─────┬────────┘ └┬┘ └───┬────┘
      │           │      └─ the MessageGroupId, percent-encoded
      │           └─ fixed ".g." group separator
      └─ the FIFO queue channel (the name includes the ".fifo" suffix)

enc percent-encodes any byte outside [a-zA-Z0-9_-].

FIFO queueMessageGroupIdKubeMQ channel
tasks.fifog1sqs.tasks.fifo.g.g1
tasks.fifoorder/42sqs.tasks.fifo.g.order%2F42

SNS topics are virtual

SNS topics have no native channel. A topic is a registry entry, synced/replicated across cluster nodes; its authorization pseudo-resource is sns.{topic}. Fan-out resolves to the target SQS channels (one batched send) plus HTTP/HTTPS webhooks at publish time. See Fan-out.

ARNs & queue URLs

FormValue
SQS ARNarn:aws:sqs:{Region}:{AccountId}:{name}
SNS ARNarn:aws:sns:{Region}:{AccountId}:{name}
Queue URL{scheme}://{host}/{AccountId}/{name} (path-style; host from AdvertisedUrl or the request Host)

Region defaults to kubemq (not enforced); AccountId defaults to 000000000000. Resolution parses the path only, so a stale host in a saved URL still works.

The registry is authoritative

Only resources created through the AWS API are visible. Operating on a native sqs.foo channel that was never CreateQueued returns NonExistentQueue.

Cross-protocol interoperability

Because the backing store is a normal KubeMQ Queue channel, an SQS SendMessage to sqs.orders is consumable by a gRPC/REST queue client on the same channel, and vice-versa.

Native-interop caveat (gotcha #7). A message produced by a native KubeMQ client on sqs.* lacks the sqs_* tags, so its MessageId falls back to the broker MessageID, it has no SenderId, and no policy stamping is applied. See Cross-protocol interop.

Message attribute ⇄ tag mapping

SQS message attributes round-trip losslessly through the KubeMQ Tags codec.

AWS fieldKubeMQ TagNotes
Message attribute {Name}sqs_attr_{Name}value is {DataType}|{value}; Binary is base64; ≤ 10 attributes, name ≤ 256 chars, no AWS./Amazon. prefix; DataType String / Number / Binary (+ subtypes String.x)
System attribute AWSTraceHeadersqs_trace_headerthe only accepted system attribute; anything else → InvalidParameterValue
(connector-stamped) MessageIdsqs_message_idgenerated UUID
(connector-stamped) SenderIdsqs_sender_idthe authenticated ClientID
FIFO MessageGroupIdsqs_group_id
FIFO MessageDeduplicationIdsqs_dedup_id

Receive-side decoded system attributes

SentTimestamp, ApproximateReceiveCount, ApproximateFirstReceiveTimestamp (node-local approx), SenderId, DeadLetterQueueSourceArn (redriven messages), and FIFO MessageGroupId / SequenceNumber / MessageDeduplicationId. Attribute-name filtering on receive supports All, exact names, and prefix.*.

SNS raw / enveloped tags

ContextMapping
SQS enveloped deliverythe SNS Notification JSON carries MessageAttributes as {Type, Value} per attribute (Binary base64)
SQS raw deliverybare body + the attribute tag codec + sns_topic_arn / sns_subject tags
HTTP raw deliverybare payload with attributes mapped to x-amz-sns-attr-{name} headers

Raw-HTTP attribute-drop deviation. AWS drops message attributes for raw HTTP delivery; this connector instead surfaces them as x-amz-sns-attr-{name} headers.

MD5

FieldAlgorithm
MD5OfMessageBodyMD5 of the body bytes
MD5OfMessageAttributesAWS length-prefixed message-attribute MD5
MD5OfMessageSystemAttributespresent only when AWSTraceHeader is set

FIFO SequenceNumber deviation

The 20-digit zero-padded SequenceNumber is the broker send-timestamp (UnixNano) on SEND and the true broker sequence on RECEIVE. It is still strictly increasing per group for serialized sends. See Reliability.

Was this page helpful?

On this page