Commit e576dd7
committed
Set durable annotation for MQTT messages
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.1 parent 11a4348 commit e576dd7
1 file changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 26 | + | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
290 | 284 | | |
291 | 285 | | |
292 | 286 | | |
293 | | - | |
| 287 | + | |
294 | 288 | | |
295 | 289 | | |
296 | 290 | | |
| |||
559 | 553 | | |
560 | 554 | | |
561 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
0 commit comments