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 java.util.concurrent.CompletableFuture<java.lang.Void>send(Message<?> message)Send a singleMessageto the channel.java.util.concurrent.CompletableFuture<java.lang.Void>sendBatch(java.util.stream.Stream<? extends Message<?>> batch)Send a batch ofmessagesto the channel.
-
-
-
Method Detail
-
send
java.util.concurrent.CompletableFuture<java.lang.Void> send(@Nonnull Message<?> message)Send a singleMessageto the channel.- Parameters:
message- the message- Returns:
- a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.
-
sendBatch
java.util.concurrent.CompletableFuture<java.lang.Void> sendBatch(@Nonnull java.util.stream.Stream<? extends Message<?>> batch)Send a batch ofmessagesto the channel.- Parameters:
batch- the batch of messages- Returns:
- a CompletableFuture that can be used for logging, error handling, waiting for completion, etc.
-
-