Commit a96f06e
Honor the delivery_mode argument in Exchange.Message
Exchange.Message accepts a delivery_mode argument and documents it as
'Set custom delivery mode. Defaults to :attr:delivery_mode', but the
body always used self.delivery_mode, so the caller's value was
discarded. Asking for a transient message on a persistent exchange
still produced delivery_mode=2, and vice versa.
Fall back to the exchange default only when no delivery mode is given,
matching Producer._delivery_details, which already does
'delivery_mode or exchange.delivery_mode'. Exchange.publish() passes no
delivery mode, so its behaviour is unchanged.1 parent 4281680 commit a96f06e
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| |||
0 commit comments