Migrate the bodies of Axon interceptors

Proprietary

AxonIQ's recipes give Axon Framework 4 interceptors Axon Framework 5's interceptOnDispatch and interceptOnHandle signatures and leave their bodies for a person. This migrates the common bodies: a dispatch interceptor that maps each message with (index, message) -> ... or visits each with messages.forEach(...), an override that only delegates to the default single message handle, and a handler interceptor that reads unitOfWork.getMessage() and returns interceptorChain.proceed(). Each then passes its message on with chain.proceed(message, context).

io.moderne.axon.MigrateInterceptorBodies
mod run . --recipe=io.moderne.axon.MigrateInterceptorBodies

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.