-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
status: invalidNot reproducable or not relevant to the current state of the projectNot reproducable or not relevant to the current state of the project
Description
We've recently upgraded from Spring Boot 2.7.x to 3.1.x. Our existing Spring Integration flows suddenly start spamming the logs with:
xxxx-xx-xxTxx:xx:xx.xxx+xx:xx WARN xxxxx --- [ Thread-x] o.s.integration.filter.MessageFilter : The message [GenericMessage [...] has been rejected in filter: bean '...' for component '...'
Which is easily traced back to this snippet of code:
Lines 180 to 195 in 261589a
@Override | |
public Object postProcess(Message<?> message, Object result) { | |
if (result == null) { | |
MessageChannel channelToDiscard = getDiscardChannel(); | |
if (channelToDiscard != null) { | |
this.messagingTemplate.send(channelToDiscard, message); | |
} | |
if (this.throwExceptionOnRejection) { | |
throw new MessageRejectedException(message, "message has been rejected in filter: " + this); | |
} | |
else if (channelToDiscard == null) { | |
logger.warn(LogMessage.format("The message [%s] has been rejected in filter: %s", message, this)); | |
} | |
} | |
return result; | |
} |
Our flow is simple, it has this in the middle of it:
# SomeConfiguration.kt
@Bean
fun someFlow() =
from(...)
...
.filter(PayloadTypeSelector(...))
.handle(...)
.get()
This code hasn't changed and produced no warnings in Spring Boot 2.7.x.
Are we doing something wrong and/or have we missed something in the docs that says we need to do something special with filtered messages? Or is this just a bug of over-zealous logging?
Metadata
Metadata
Assignees
Labels
status: invalidNot reproducable or not relevant to the current state of the projectNot reproducable or not relevant to the current state of the project