Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans for message priority levels and/or a message type governor? #202

Open
Eric24 opened this issue Mar 26, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Eric24
Copy link

Eric24 commented Mar 26, 2024

  • Message Priority Levels: A numeric value from 0 to n, where higher numbers have higher priority. When reading messages from the queue, messages with higher priority values are returned before those with lower priority values. This allows for messages to be assigned relative priorities, similar to RabbitMQ Priority Queues.
  • Message Type Governor: An optional property on the message that defines its "type" (arbitrary from the perspective of PGMQ). When reading (or as part of the queue configuration), the maximum number of messages with the same type value that can be "invisible" at one time is specified. So that if the max is 10, and there are already 9 invisible messages with type = 'xyz', only one more of this type can be returned, even if there are more and the reader asks for more. This allows for resource management so that one type of message can't use all available resources (i.e. if there are 20 available "message handlers", setting the max to 10 would prevent any given message type from using more than 50% of the handlers at once).
@ChuckHend
Copy link
Contributor

Hi @Eric24,

There is not a formal plan in place for priority levels, although it's something that has been discussed and something I think would be worth supporting. We could work together on getting a plan in place for that! My first thought is that this might be best introduced as a new queue type, so the project would then have standard, partitioned, and now a priority queue. I'm open to ideas though.

A governor is an interesting idea. I have not personally seen something like this implemented but I can see where it would be useful, and feels kind of related to priority queue, but not exactly?

@ChuckHend ChuckHend added the enhancement New feature or request label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants