Interface MessageSender

All Known Subinterfaces:
MessageSenderEndpoint
All Known Implementing Classes:
AbstractMessageSenderEndpoint, DelegateMessageSenderEndpoint, TeeMessageSender

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

Message Endpoint

See Also:
  • Method Details

    • send

      CompletableFuture<Void> send(@Nonnull Message<?> message)
      Send a single Message to the channel.
      Parameters:
      message - the message
      Returns:
      a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.
    • sendBatch

      CompletableFuture<Void> sendBatch(@Nonnull Stream<? extends Message<?>> batch)
      Send a batch of messages to the channel.
      Parameters:
      batch - the batch of messages
      Returns:
      a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.