Commit 312f129
committed
GH-3174: Fix
Similar to: #3174
The `absoluteExpiryTime`, according to the AMQP 1.0 message format, is a timestamp when a message should expire.
The AMQP 0.9.1 deals with a period instead of absolute time.
* Fix `RabbitAmqpUtils` to calculate `expiration` from the difference between
`absoluteExpiryTime` and `creationTime` (which is also absolute).
* Use `System.currentTimeMillis()` if `creationTime` is not provided.
* Fix an `absoluteExpiryTime` calculation based on the `creationTime` and `expiration`
**Auto-cherry-pick to `3.2.x`**expiration property conversion for AMQP 1.0 module1 parent a788393 commit 312f129
File tree
1 file changed
+21
-11
lines changed- spring-rabbitmq-client/src/main/java/org/springframework/amqp/rabbitmq/client
1 file changed
+21
-11
lines changedspring-rabbitmq-client/src/main/java/org/springframework/amqp/rabbitmq/client/RabbitAmqpUtils.java
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| |||
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
| |||
0 commit comments