From be208298c9f77b49e616fbe63265af1eccc75d02 Mon Sep 17 00:00:00 2001 From: Justin Slatten Date: Tue, 23 Dec 2025 14:43:02 -0800 Subject: [PATCH 1/2] Add new documentation to enable Pulsar PubSub message compression Signed-off-by: Justin Slatten --- .../supported-pubsub/setup-pulsar.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md index 12a503fea7e..ed65de35171 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md @@ -205,6 +205,43 @@ curl -X POST http://localhost:3500/v1.0/publish/myPulsar/myTopic?metadata.delive }' ``` +### Enabling message compression + +Message compression can reduce message size at the cost of slightly more CPU usage during publishing. Compression is applied at the producer level. + +| Compression Type | Description | +|------------------|-------------| +| `none` | No compression (default) | +| `lz4` | LZ4 compression - fast compression/decompression | +| `zlib` | ZLib compression - balanced compression ratio | +| `zstd` | ZSTD compression - high compression ratio | + +| Compression Level | Description | +|-------------------|-------------| +| `default` | Default compression level for the selected type | +| `faster` | Prioritizes speed over compression ratio | +| `better` | Prioritizes compression ratio over speed | +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: messagebus +spec: + type: pubsub.pulsar + version: v1 + metadata: + - name: host + value: "localhost:6650" + - name: compressionType + value: lz4 + - name: compressionLevel + value: faster +``` + +> **Note:** The metadata keys `compressionType` and `compressionLevel` are case-sensitive and must be specified exactly as shown. Compression is applied when publishing messages; consumers automatically decompress regardless of settings. + +#### + ### E2E Encryption Dapr supports setting public and private key pairs to enable Pulsar's [end-to-end encryption feature](https://pulsar.apache.org/docs/3.0.x/security-encryption/). From bd160dfb00e9bb1d7a495fb8190ce4db271e39be Mon Sep 17 00:00:00 2001 From: Justin Slatten Date: Tue, 23 Dec 2025 16:37:53 -0800 Subject: [PATCH 2/2] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Justin Slatten --- .../components-reference/supported-pubsub/setup-pulsar.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md index ed65de35171..923b6ca21fc 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md @@ -240,8 +240,6 @@ spec: > **Note:** The metadata keys `compressionType` and `compressionLevel` are case-sensitive and must be specified exactly as shown. Compression is applied when publishing messages; consumers automatically decompress regardless of settings. -#### - ### E2E Encryption Dapr supports setting public and private key pairs to enable Pulsar's [end-to-end encryption feature](https://pulsar.apache.org/docs/3.0.x/security-encryption/).