{"id":"1e7cff2c-1636-47e2-8271-1bd30c4fca52","task":"avoid ordering and skew pitfalls when using pulsar's key_shared subscription","domain":"pulsar.apache.org","steps":["Choose Key_Shared when messages must be distributed across consumers but same-key or same-ordering-key messages must go to only one consumer.","Pick a mapping algorithm: Auto-split Hash Range or Auto-split Consistent Hashing for automatic load balancing, or the Sticky hash range policy for manual control.","If using the Sticky policy, manually assign hash ranges from 0 to 65535 per consumer and ensure the union of all ranges covers the full range, or messages in uncovered ranges get stuck.","To guarantee strict per-key ordering, use the sticky hash range policy and manage range splitting and coverage explicitly rather than relying on auto-split.","Monitor consumer scale-up and scale-down events, since auto-split hash ranges get reshuffled when consumers join or leave, temporarily affecting ordering guarantees."],"gotchas":["With sticky hash ranges, any hash value not covered by an assigned range has no consumer to dispatch to, and Pulsar can't deliver those messages until ranges are fixed.","Only Key_Shared with the sticky policy gives strict ordering; auto-split modes rebalance ranges on consumer changes, which can reorder delivery across a rebalance."],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/1e7cff2c-1636-47e2-8271-1bd30c4fca52"}