Content Transfer Encodings¶
Encode event payloads for safe transport over text-based protocols.
Overview¶
Content transfer encodings transform binary data into a text-safe representation. They're optional — without a content transfer encoding, the payload is sent as-is.
Content transfer encoding runs after both serialization and content encoding.
Available Content Transfer Encodings¶
| Encoding | Config | Description |
|---|---|---|
| Base64 | base64 |
RFC 4648 Base64 encoding |
Quick Example¶
Base64 encode for text-only transports:
When to Use¶
Content transfer encoding is useful when:
- The destination only accepts text (e.g., AWS SQS message bodies)
- You're using a binary serializer (Protobuf, Avro, CBOR) over a text-based protocol
- You're combining with content encoding (gzip + base64)
Processing Order¶
The encoding pipeline runs in this order:
- Serialization — event → bytes (e.g., JSON, Protobuf)
- Content Encoding — compress bytes (e.g., gzip)
- Content Transfer Encoding — encode bytes (e.g., base64)
See Also¶
- Serializers — format events before encoding
- Content Encodings — compress before transfer encoding
- Destinations — where events are sent