Skip to content

Documentation Issue: MessageHandlerInterceptor should return a value when a Message Handler has a return value #209

Open
@edreyer

Description

@edreyer

This applies to projects using the Reactor extension only (I think).

If a @CommandHandler method returns a value, any @MessageHandlerInterceptor interceptor methods must also return a value, or that value is lost and null is returned to the message sender.

e.g.

@MessageHandlerInterceptor(messageType = CommandMessage::class)
fun handleTheThing(
  cmdMsg: CommandMessage<*>,
  chain: InterceptorChain
): Any {
  return chain.proceed() // must return or value is lost
}

I discovered this via some trial and error. It might be helpful if the docs also reflected this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions