Fixes: https://github.com/spring-cloud/spring-cloud-stream/issues/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
Fixes: #2901
* Rework an observation for Rabbit Binder
The observation propagation doesn't work in multi-binder configuration
* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in a multi-binder environment
As a side effect, this fixes an observation propagation for the Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared. beans`
Related to https://github.com/spring-cloud/spring-cloud-stream/issues/2901
Also see https://github.com/spring-cloud/spring-cloud-stream/issues/2902 for possible evolution
* Update the copyright of the affected classes
Fix ClassCastException when handling error while using batch mode that prevents the republish of the message into the DLQ. The issue happened whenever the republish to dlq was enabled or if republish was disabled and max attempts were > 1 while the batch mode was enabled, because the handler was not expecting the the sourceData for the ErrorMessage could be a list of amqp message.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2510
New feature on RabbitMQ (Super Stream with Single Active Consumer) enables
scaling out app instances when using this queue type/config.
`RabbitStreamMessageHandler` is now available in Spring Integration.
This commit establishes the concept of binder identity (binder instance identity) to be used in cases where unique-to-the-binder-instance naming is required.
For example such naming is required to fix GH-2507 where error channel names could colide if two binders use the same destination name.
Resolves#2512Resolves#2507
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2453
Previously, to configure the use of an alternative exchange (used to route
messages when no queue is bound), the user had to manually declare the
exchange and any bindings, and modify the destination exchange using a
`DeclarablesCustomizer` bean.
Add first class support to configure the destination exchange and, optionally,
provision the alternate exchange as well as optionally binding a specific
queue to it.
Resolves#2502
Adapts to the following changes in upstreams libs:
- Spring Kafka removed ListenableFuture
- Spring AOT changed generator API
Fixes#2473#2465
Checkstyle fixes
This commit also includes partial work to ensure framework works in full native/AOT mode.
Also, PollableBean remains and will simply not work in AOT mode until https://github.com/spring-projects/spring-framework/issues/28748 is resolved. That said, i will be deprecating t and it will be removed in the next release given that we already have configurable alternative
Resolves#2456
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2307
- when creating `Declarables` beans for redeclaration after a connetion failure
2 DLX/DLQ bindings used the same bean name so the second one was never recovered/
- removing consumer `Declarable` beans from the `autoDeclareContext` was incomplete
- removing producer `Declarable` beans was not performed at all
- fix bean names; fix cleanup; add tests for all config scenarios
- check cleanup in all `RabbitBinderTests`
**cherry-pick to 3.2.x when the mono repo is established**
Resolves#2309