spring-framework / org.springframework.messaging.support / ExecutorChannelInterceptor / afterMessageHandled

afterMessageHandled

abstract fun afterMessageHandled(message: Message<*>, channel: MessageChannel, handler: MessageHandler, @Nullable ex: Exception): Unit

Invoked inside the Runnable submitted to the Executor after calling the target MessageHandler regardless of the outcome (i.e. Exception raised or not) thus allowing for proper resource cleanup.

Note that this will be invoked only if beforeHandle successfully completed and returned a Message, i.e. it did not return null.

Parameters

message - the message handled

channel - the channel on which the message was sent to

handler - the target handler that handled the message

ex - any exception that may been raised by the handler