Interface MessageConfig<T>

Type Parameters:
T - payload type
All Superinterfaces:
Prototype.Api, Prototype.Factory<Message<T>>

public sealed interface MessageConfig<T> extends Prototype.Api
Message construction options.
See Also:
  • Method Details

    • builder

      static <T> MessageConfig.Builder<T> builder()
      Create a new fluent API builder to customize configuration.
      Type Parameters:
      T - payload type
      Returns:
      a new builder
    • builder

      static <T> MessageConfig.Builder<T> builder(MessageConfig<T> instance)
      Create a new fluent API builder from an existing instance.
      Type Parameters:
      T - payload type
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • entity

      T entity()
      Non-null message payload.
      Returns:
      payload
    • headers

      List<MessageHeader> headers()
      Ordered portable headers. Defaults to an empty list. Setting this option replaces the current entries; adding headers preserves their order and duplicate names. The builder accumulates entries in a mutable list and the prototype contains an immutable snapshot.
      Returns:
      portable headers
    • localMetadata

      Map<String, MessageHeaderValue> localMetadata()
      Metadata local to this message envelope. Defaults to an empty map. Setting this option replaces the current entries; adding a value replaces the value with the same exact name. The builder accumulates entries in a mutable map and the prototype contains an immutable snapshot. Local metadata remains in-process and is not part of portable headers or generic connector mapping.
      Returns:
      local metadata