Package de.otto.synapse.endpoint.sender
Interface MessageSender
-
- All Known Subinterfaces:
MessageSenderEndpoint
- All Known Implementing Classes:
AbstractMessageSenderEndpoint,DelegateMessageSenderEndpoint,TeeMessageSender
public interface MessageSenderEndpoint that is used by an application to send messages to a messaging channel.
- See Also:
- EIP: Message Endpoint
-
-
Method Summary
Modifier and Type Method Description <T> java.util.concurrent.CompletableFuture<java.lang.Void>send(Message<T> message)Send a singleMessageto the channel.<T> java.util.concurrent.CompletableFuture<java.lang.Void>sendBatch(java.util.stream.Stream<Message<T>> batch)Send a batch ofmessagesto the channel.
-
-
-
Method Detail
-
send
<T> java.util.concurrent.CompletableFuture<java.lang.Void> send(@Nonnull Message<T> message)Send a singleMessageto 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 ofmessagesto 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.
-
-