I am not sure if this is a UdpSyslogReceivingChannelAdapter or UnicastReceivingChannelAdapter specific problem, but in case MessageConverter throws an exception, the exception message ends in stderr instead of the log.
Because of the nature of UDP, we perform an async send so we can get back to receive more data at the earliest opportunity. We can't rely on the user configuring an ExecutorChannel.
We need a try/catch/log in the Runnable lambda.
try {
taskExecutor.execute(() -> doSend(packet));
}
catch (RejectedExecutionExceptione) {
if (logger.isDebugEnabled()) {
logger.debug("Adapter stopped, sending on main thread");
}
doSend(packet);
}
Alen Turkovic opened INT-4552 and commented
I am not sure if this is a
UdpSyslogReceivingChannelAdapter
orUnicastReceivingChannelAdapter
specific problem, but in caseMessageConverter
throws an exception, the exception message ends instderr
instead of the log.Here is a sample application to reproduce:
If I send a packet to port 1997,
IllegalStateException
ends up instderr
.Referenced from: pull request #2627
Backported to: 5.0.10
The text was updated successfully, but these errors were encountered: