Skip to content

Conversation

ansd
Copy link
Member

@ansd ansd 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 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.
@ansd ansd marked this pull request as ready for review April 22, 2024 14:54
@ansd ansd added this to the 3.13.2 milestone Apr 22, 2024
@ansd ansd merged commit e576dd7 into main Apr 22, 2024
@ansd ansd deleted the mqtt-qos branch April 22, 2024 15:33
ansd added a commit that referenced this pull request May 2, 2024
This is similar to #11057

What?
For incoming AMQP 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.

The performance impact of always setting the durable annotation is negligible.
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.

2 participants