I have following line in my handler:
headers.put(EMPTY_FILE, true);
It is a reason of:
2019-11-26 13:36:29.420 ERROR 2216 --- [sub-subscriber3] o.s.integration.handler.LoggingHandler : ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: error occurred during processing message in 'MethodInvokingMessageProcessor' [org.springframework.integration.handler.MethodInvokingMessageProcessor@319058ce]; nested exception is java.lang.UnsupportedOperationException: MessageHeaders is immutable, failedMessage=GenericMessage...
How could I fix it ?
MessageHeaders is read-only. You can only copy exists headers to new map (include your own header too) and create NEW MessageHeader from this map.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With