All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.otto.synapse.endpoint.sender.MessageSender Maven / Gradle / Ivy

Go to download

A library used at otto.de to implement Spring Boot based event-sourcing microservices.

There is a newer version: 0.33.1
Show newest version
package de.otto.synapse.endpoint.sender;

import de.otto.synapse.message.Message;

import javax.annotation.Nonnull;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;

/**
 * Endpoint that is used by an application to send messages to a messaging channel.
 *
 * 

* Message Endpoint *

* * @see EIP: Message Endpoint */ public interface MessageSender { /** * Send a single {@link Message} to the channel. * * @param message the message * @return a CompletableFuture that can be used for logging, error handling, waiting for completion, etc. */ CompletableFuture send(@Nonnull Message message); /** * Send a batch of {@link Message messages} to the channel. * * @param batch the batch of messages * @return a CompletableFuture that can be used for logging, error handling, waiting for completion, etc. */ CompletableFuture sendBatch(@Nonnull Stream> batch); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy