Interface MessageTransformation<M extends Message>

Type Parameters:
M - the message type accepted as input and emitted as output
All Known Subinterfaces:
EventTransformation

public interface MessageTransformation<M extends Message>
Transforms messages of type M.

A transformation accepts a Message of type M and produces zero or more transformed messages of the same type.

Since:
5.2.0
Author:
Laura Devriendt
  • Method Summary

    Modifier and Type
    Method
    Description
    MessageStream<? extends M>
    transform(M message, TransformationContext context)
    Transforms a message into zero or more messages of the same type.
  • Method Details

    • transform

      @Internal MessageStream<? extends M> transform(M message, TransformationContext context)
      Transforms a message into zero or more messages of the same type. If the transformation fails, the returned stream completes with the error.
      Parameters:
      message - the input message, cannot be null
      context - the transformation context, cannot be null
      Returns:
      a stream of transformed messages, or a stream completed with an error if the transformation failed, never null
      Throws:
      NullPointerException - if message or context is null