Mooshua commented on issue #24676: URL: https://github.com/apache/pulsar/issues/24676#issuecomment-3234341893
> It seems to be a FIFO queue currently. It definitely makes sense to support producer provided priority and use a PriorityQueue. I guess it would be possible to retain the previous FIFO behavior by assigning the priorities in a way that it results in FIFO order if the priority isn't provided by the client for a producer. One option is to sort by priority, *then* by add order. A default priority is chosen if a client doesn't specify. So, existing producers still see FIFO behavior, but an "enlightened" producer could choose to adopt priority. > Adding priority for producers raises the question whether there should also be an exclusive mode where a higher priority producer would always takeover a lower priority producer. Something like an ExclusivePriority mode. Hmm. I mean, this is already *somewhat* possible with `ExclusiveWithFence` so I don't see any obvious motivating examples. Eg, a producer could publish it's priority as part of it's messages, and a node with lower priority could pre-empt that producer by using `ExclusiveWithFence` and then publishing a higher priority. > The solution (including rejected alternatives) would be documented in a PIP (Pulsar Improvement Proposal) document besides updating user facing documentation Gotcha. Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org