Hi all :wave: I have a question about per-key sche...
# general
b
Hi all 👋 I have a question about per-key scheduling behavior in Pulsar. I need strict ordering and exclusivity per
sensor_id
, but I don’t want long-lived key to consumer stickiness. Instead, I’m trying to achieve this logic:
If no consumer is currently processing
sensor_id = X
, then the next message for that sensor should be assigned to the next available consumer (round-robin or least-loaded).
All while preserving ordering and ensuring no two consumers ever process the same key concurrently.
KeyShared
ensures ordering and exclusivity, but it uses stable key-range hashing, so a key stays with one consumer until that consumer dies. Is there any Pulsar pattern, config, or upcoming feature that supports dynamic per-message key assignment instead of sticky key-range ownership? Or is this fundamentally outside Pulsar’s delivery semantics? Thanks! 🙏