Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,41 @@ 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
```
Comment on lines +235 to +239
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new metadata fields compressionType and compressionLevel should be documented in the "Spec metadata fields" table (around line 74-98) for consistency with how other metadata fields are documented in this file. The table should include entries for both fields with their Required status (N), Details (description, valid values, and defaults), and Examples.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback


> **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/).
Expand Down