lhotari commented on issue #24676: URL: https://github.com/apache/pulsar/issues/24676#issuecomment-3232588833
> I can absolutely open a PR for the "shuffle the waiting producer queue" option if that sounds like a good addition :) > > Q: Is the promotion order of producers ever explicitly defined anywhere, or is it an implementation detail? I combed the docs and I couldn't find anything. `WaitForExclusive` mode was defined in https://github.com/apache/pulsar/blob/master/pip/pip-68.md . I guess you are already aware of the code location where the queue is: https://github.com/apache/pulsar/blob/27df79edd0ffdf105c6b07220be90be96361ff07/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L839-L848 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. 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. btw. The solution (including rejected alternatives) would be documented in a PIP (Pulsar Improvement Proposal) document besides updating user facing documentation. The PIP process itself is fairly light weight and is explained in https://github.com/apache/pulsar/tree/master/pip#pulsar-improvement-proposal-pip . -- 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