Warn about dropped message in filter (#8579)
* Warn about dropped message in filter Buy default the `MessageFilter` just drops a discarded message silently. If a request-reply gateway is used upstream, then it becomes unclear why the flow sometimes doesn't work. * Add a waring log ot emit for default behavior. This still doesn't fix the request-reply problem, but at least it can give a clue what is going on * * Mention `nullChannel` variant to ignore even warn * Fix language in docs Co-authored-by: Gary Russell <grussell@vmware.com> --------- Co-authored-by: Gary Russell <grussell@vmware.com>
This commit is contained in:
@@ -88,6 +88,10 @@ If you want rejected messages to be routed to a specific channel, provide that r
|
||||
----
|
||||
====
|
||||
|
||||
If the `throwExceptionOnRejection == false` and no `discardChannel` is provided, the message is silently dropped and an `o.s.i.filter.MessageFilter` instance just emits a warning log message (starting with version 6.1) about this discarded message.
|
||||
To drop the message with no warning in the logs, a `NullChannel` can be configured as the `discardChannel` on the filter.
|
||||
The goal of the framework is to not be completely silent, by default, requiring an explicit option to be set, if that is the desired behavior.
|
||||
|
||||
See also <<./handler-advice.adoc#advising-filters,Advising Filters>>.
|
||||
|
||||
NOTE: Message filters are commonly used in conjunction with a publish-subscribe channel.
|
||||
|
||||
@@ -30,6 +30,8 @@ See <<./zip.adoc#zip,Zip Support>> for more information.
|
||||
- Added support for transforming to/from Protocol Buffers.
|
||||
See <<./transformer.adoc#Protobuf-transformers, Protocol Buffers Transformers>> for more information.
|
||||
|
||||
- The `MessageFilter` now emits a warning into logs when message is silently discarded and dropped.
|
||||
See <<./filter.adoc#filter, Filter>> for more information.
|
||||
|
||||
[[x6.1-web-sockets]]
|
||||
=== Web Sockets Changes
|
||||
|
||||
Reference in New Issue
Block a user