End-to-end encryption (E2EE) protects message contents across a Kafka pipeline by having producers encrypt before publication and consumers decrypt after retrieval. Unlike client–broker encryption, the broker never sees plaintext, so encrypted data can remain protected on broker disks. section 9.3.5
A Kafka E2EE design carries several architectural and operational consequences:
- Kafka provides no built-in E2EE mechanism; custom application logic, client-library integration, or an intermediary proxy is required. section 9.3.5
- Use a key management service for key creation, issuance, and revocation, and ensure every participating component supports the encryption policy. section 9.3.5
- Avoid encrypting partition keys when stable data distribution matters; place encryption parameters in message headers rather than the payload when appropriate. section 9.3.5
- Treat E2EE as complementary to authentication, authorization, and TLS rather than as a replacement for them. section 9.0 section 9.5
Protected Kafka message flow
A producer encrypts a regulated message before sending it to Kafka. The broker stores and forwards the ciphertext without processing its contents, and an authorized consumer decrypts it after retrieval. A KMS supplies and revokes the relevant keys; a proxy can centralize encryption and decryption when client changes are difficult. section 9.3.5
Figure 9.12 Implementing end-to-end encryption with the encryption and decryption of messages done on the clients
Client-side encryption and decryption across the Kafka message path. section 9.3.5


