You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-2939: Rely on custom AmqpHeaders.RETRY_COUNT for server retries
Fixes: #2939
The RabbitMQ 4.0 does not deal with client side `x-*` headers.
Therefore, an `x-death.count` is not incremented anymore when
message is re-published from client back to the broker.
* Spring AMQP 3.2 has introduced an `AmqpHeaders.RETRY_COUNT` custom header.
Use `messageProperties.incrementRetryCount()` in the `RabbitMessageChannelBinder`
when we re-published message back to the broker for server-side retries
* Fix docs respectively
Resolves#3019
Copy file name to clipboardExpand all lines: binders/rabbit-binder/spring-cloud-stream-binder-rabbit/src/main/java/org/springframework/cloud/stream/binder/rabbit/RabbitMessageChannelBinder.java
@@ -128,9 +118,10 @@ public class ReRouteDlqApplication {
128
118
[[partitioned-destinations]]
129
119
== Partitioned Destinations
130
120
131
-
With partitioned destinations, there is one DLQ for all partitions. We determine the original queue from the headers.
121
+
With partitioned destinations, there is one DLQ for all partitions.
122
+
We determine the original queue from the headers.
132
123
133
-
[[republishtodlq=false]]
124
+
[[republishtodlq-false]]
134
125
=== `republishToDlq=false`
135
126
136
127
When `republishToDlq` is `false`, RabbitMQ publishes the message to the DLX/DLQ with an `x-death` header containing information about the original destination, as shown in the following example:
@@ -148,8 +139,6 @@ public class ReRouteDlqApplication {
148
139
149
140
private static final String X_DEATH_HEADER = "x-death";
150
141
151
-
private static final String X_RETRIES_HEADER = "x-retries";
152
-
153
142
public static void main(String[] args) throws Exception {
0 commit comments