{"id":"0096ddf6-fc44-42be-87fc-c1971f0f606a","task":"Configure Apache Pulsar topic-level policies for retention, TTL, and backlog quota","domain":"pulsar.apache.org","steps":["Set a retention policy on a specific topic to keep messages beyond acknowledgement: `pulsar-admin topics set-retention --size 1G --time 7d persistent://<tenant>/<namespace>/<topic>`","Set a message TTL (time-to-live) so unacknowledged messages are automatically deleted after a period: `pulsar-admin topics set-message-ttl --ttl 3600 persistent://<tenant>/<namespace>/<topic>`","Configure a backlog quota to control how much unacknowledged data accumulates: `pulsar-admin topics set-backlog-quota --limit 512M --limitType size --policy producer_request_hold persistent://<tenant>/<namespace>/<topic>`","Verify all topic-level policies are applied by running `pulsar-admin topics get-retention`, `get-message-ttl`, and `get-backlog-quota` for the topic","Monitor backlog via `pulsar-admin topics stats <topic>` and inspect the storageSize and backlogSize metrics to confirm policies are taking effect"],"gotchas":["Topic-level policies override namespace-level policies for the same setting; if you set a shorter TTL at the topic level, the namespace TTL no longer applies to that topic","Retention and TTL interact: retention keeps acknowledged messages for the specified period, while TTL deletes unacknowledged messages after the TTL expires — they govern different message populations","The backlog policy option `producer_exception` causes producers to receive an exception when the limit is exceeded, which can crash poorly-handled producer code; prefer `producer_request_hold` to throttle producers gracefully during initial configuration"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:40:37.260Z"},"url":"https://mcp.waymark.network/r/0096ddf6-fc44-42be-87fc-c1971f0f606a"}