You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,6 +273,42 @@ curl -X POST http://localhost:3500/v1.0/publish/myPulsar/myTopic?metadata.delive
273
273
}'
274
274
```
275
275
276
+
### Enabling message compression
277
+
278
+
Message compression can reduce message size at the cost of slightly more CPU usage during publishing. Compression is applied at the producer level.
279
+
280
+
| Compression Type | Description |
281
+
|------------------|-------------|
282
+
| `none` | No compression (default) |
283
+
| `lz4` | LZ4 compression - fast compression/decompression |
284
+
| `zlib` | ZLib compression - balanced compression ratio |
285
+
| `zstd` | ZSTD compression - high compression ratio |
286
+
287
+
| Compression Level | Description |
288
+
|-------------------|-------------|
289
+
| `default` | Default compression level for the selected type |
290
+
| `faster` | Prioritizes speed over compression ratio |
291
+
| `better` | Prioritizes compression ratio over speed |
292
+
293
+
```yaml
294
+
apiVersion: dapr.io/v1alpha1
295
+
kind: Component
296
+
metadata:
297
+
name: messagebus
298
+
spec:
299
+
type: pubsub.pulsar
300
+
version: v1
301
+
metadata:
302
+
- name: host
303
+
value: "localhost:6650"
304
+
- name: compressionType
305
+
value: lz4
306
+
- name: compressionLevel
307
+
value: faster
308
+
```
309
+
310
+
> **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.
311
+
276
312
### E2E Encryption
277
313
278
314
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/).
0 commit comments