Class EventingTestKit.MessageBuilder

Object
akka.javasdk.testkit.EventingTestKit.MessageBuilder
Enclosing interface:
EventingTestKit

public static class EventingTestKit.MessageBuilder extends Object
  • Constructor Details

    • MessageBuilder

      public MessageBuilder(akka.javasdk.impl.MessageCodec messageCodec)
  • Method Details

    • of

      public <T> EventingTestKit.Message<T> of(T payload, String subject)
      Create a message from a payload plus a subject (that is, the entity id). Automatically adds required default metadata for a CloudEvent.
      Type Parameters:
      T -
      Parameters:
      payload - the message payload
      subject - the entity id of which the message is concerned about
      Returns:
      a Message object to be used in the context of the Testkit
    • of

      public <T> EventingTestKit.Message<T> of(T payload, akka.javasdk.Metadata metadata)
      Create a message object from a payload plus metadata.
      Type Parameters:
      T -
      Parameters:
      payload - the message payload
      metadata - the metadata associated with the message
      Returns:
      a Message object to be used in the context of the Testkit