GH-1339: Fix RLErrorHandler with Conversion Ex. (#1346)
Resolves https://github.com/spring-projects/spring-amqp/issues/1339 Error handler was not called for conversion exceptions, preventing the application from returning some error to the caller for request/reply processing. **cherry-pick to 2.2.x**
This commit is contained in:
@@ -3276,7 +3276,7 @@ static class TxServiceImpl implements TxService<Foo> {
|
||||
|
||||
@Override
|
||||
@RabbitListener(...)
|
||||
public String handle(Foo foo, String rk) {
|
||||
public String handle(Thing thing, String rk) {
|
||||
...
|
||||
}
|
||||
|
||||
@@ -3359,6 +3359,10 @@ public Object handleError(Message amqpMessage, org.springframework.messaging.Mes
|
||||
----
|
||||
====
|
||||
|
||||
Starting with version 2.2.18, if a message conversion exception is thrown, the error handler will be called, with `null` in the `message` argument.
|
||||
This allows the application to send some result to the caller, indicating that a badly-formed message was received.
|
||||
Previously, such errors were thrown and handled by the container.
|
||||
|
||||
====== Container Management
|
||||
|
||||
Containers created for annotations are not registered with the application context.
|
||||
|
||||
Reference in New Issue
Block a user