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

Set durable annotation for MQTT messages (backport #11057) #11059

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Apr 22, 2024

This is a follow up to #11012

What?

For incoming MQTT messages, always set the durable message container annotation.

Why?

Even though defaulting to durable=true when no durable annotation is set, as prior to this commit, is good enough, explicitly setting the durable annotation makes the code a bit more future proof and maintainable going forward in 4.0 where we will rely more on the durable annotation because AMQP 1.0 message headers will be omitted in classic and quorum queues (see #10964)

For MQTT messages, it's important to know whether the message was published with QoS 0 or QoS 1 because it affects the QoS of the MQTT message that will delivered to the MQTT subscriber.

The performance impact of always setting the durable annotation is negligible.


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

This is a follow up to #11012

 ## What?
For incoming MQTT messages, always set the `durable` message container
annotation.

 ## Why?
Even though defaulting to `durable=true` when no durable annotation is
set, as prior to this commit, is good enough, explicitly setting the
durable annotation makes the code a bit more future proof and
maintainable going forward in 4.0 where we will rely more on the durable
annotation because AMQP 1.0 message headers will be omitted in classic
and quorum queues (see #10964)

For MQTT messages, it's important to know whether the message was
published with QoS 0 or QoS 1 because it affects the QoS for the MQTT
message that will delivered to the MQTT subscriber.

The performance impact of always setting the durable annotation is
negligible.

(cherry picked from commit e576dd7)
@mergify mergify bot assigned ansd Apr 22, 2024
@ansd ansd merged commit 83a515d into v3.13.x Apr 22, 2024
16 checks passed
@ansd ansd deleted the mergify/bp/v3.13.x/pr-11057 branch April 22, 2024 16:00
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.

1 participant