de.otto.synapse.endpoint.receiver.MessageReceiverEndpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of synapse-core Show documentation
Show all versions of synapse-core Show documentation
A library used at otto.de to implement Spring Boot based event-sourcing microservices.
package de.otto.synapse.endpoint.receiver;
import de.otto.synapse.consumer.MessageConsumer;
import de.otto.synapse.consumer.MessageDispatcher;
import de.otto.synapse.endpoint.MessageEndpoint;
import javax.annotation.Nonnull;
/**
* Receiver-side {@code MessageEndpoint endpoint} of a Message Channel
*
*
*
*/
public interface MessageReceiverEndpoint extends MessageEndpoint {
/**
* Registers a MessageConsumer at the receiver endpoint.
*
* {@link MessageConsumer consumers} have to be thread safe as they might be called from multiple threads
* in parallel (e.g. for kinesis streams there is one thread per shard).
*
* @param messageConsumer registered EventConsumer
*/
void register(MessageConsumer> messageConsumer);
/**
* Returns the MessageDispatcher that is used to dispatch messages.
*
* @return MessageDispatcher
*/
@Nonnull
MessageDispatcher getMessageDispatcher();
}