Interface MessageSenderEndpoint

All Superinterfaces:
MessageEndpoint
All Known Implementing Classes:
AbstractMessageSenderEndpoint, DelegateMessageSenderEndpoint

public interface MessageSenderEndpoint
extends MessageEndpoint
Endpoint that is used by an application to send messages to a messaging channel.

Message Endpoint

See Also:
EIP: Message Endpoint
  • Method Details

    • send

      <T> java.util.concurrent.CompletableFuture<java.lang.Void> send​(@Nonnull Message<T> message)
      Send a single Message to the channel.
      Type Parameters:
      T - the type of the message payload
      Parameters:
      message - the message
      Returns:
      a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.
    • sendBatch

      <T> java.util.concurrent.CompletableFuture<java.lang.Void> sendBatch​(@Nonnull java.util.stream.Stream<Message<T>> batch)
      Send a batch of messages to the channel.
      Type Parameters:
      T - the type of the message payload
      Parameters:
      batch - the batch of messages
      Returns:
      a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.