Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Jul 13, 2024

Arguments

  • rabbitmq:stream-offset-spec,
  • rabbitmq:stream-filter,
  • rabbitmq:stream-match-unfiltered are set in the filter field of the Source.
    This makes sense for these consumer arguments because:

A filter acts as a function on a message which returns a boolean result
indicating whether the message can pass through that filter or not.

Consumer priority is not really such a predicate.
Therefore, it makes more sense to set consumer priority in the properties field of the Attach frame.

We call the key rabbitmq:priority which maps to consumer argument x-priority.

While AMQP 0.9.1 consumers are allowed to set any integer data type for the priority level, this commit decides to enforce an int value (range -(2^31) to 2^31 - 1 inclusive).
Consumer priority levels outside of this range are not needed in practice.


This is an automatic backport of pull request #11705 done by Mergify.

Arguments
* `rabbitmq:stream-offset-spec`,
* `rabbitmq:stream-filter`,
* `rabbitmq:stream-match-unfiltered`
are set in the `filter` field of the `Source`.
This makes sense for these consumer arguments because:
> A filter acts as a function on a message which returns a boolean result
> indicating whether the message can pass through that filter or not.

Consumer priority is not really such a predicate.
Therefore, it makes more sense to set consumer priority in the
`properties` field of the `Attach` frame.

We call the key `rabbitmq:priority` which maps to consumer argument
`x-priority`.

While AMQP 0.9.1 consumers are allowed to set any integer data
type for the priority level, this commit decides to enforce an `int`
value (range -(2^31) to 2^31 - 1 inclusive).
Consumer priority levels outside of this range are not needed in
practice.

(cherry picked from commit e6587c6)
@mergify mergify bot assigned ansd Jul 13, 2024
@michaelklishin michaelklishin merged commit efae3e5 into v4.0.x Jul 13, 2024
@michaelklishin michaelklishin deleted the mergify/bp/v4.0.x/pr-11705 branch July 13, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants