Interface MessageSender

    • Method Summary

      Modifier and Type Method Description
      <T> java.util.concurrent.CompletableFuture<java.lang.Void> send​(Message<T> message)
      Send a single Message to the channel.
      <T> java.util.concurrent.CompletableFuture<java.lang.Void> sendBatch​(java.util.stream.Stream<Message<T>> batch)
      Send a batch of messages to the channel.
    • Method Detail

      • 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.