Package org.axonframework.messaging
Interface SubscribableMessageSource<M extends Message<?>>
- Type Parameters:
M- the message type
- All Known Subinterfaces:
EventBus,EventStore
- All Known Implementing Classes:
AbstractEventBus,AbstractEventStore,AxonServerEventStore,EmbeddedEventStore,EmbeddedEventStore,InboundEventMessageChannelAdapter,PersistentStreamMessageSource,SimpleEventBus
public interface SubscribableMessageSource<M extends Message<?>>
Interface for a source of
messages to which message processors can subscribe.- Since:
- 3.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionSubscribe the givenmessageProcessorto this message source.
-
Method Details
-
subscribe
Subscribe the givenmessageProcessorto this message source. When subscribed, it will receive all messages published to this source.If the given
messageProcessoris already subscribed, nothing happens.- Parameters:
messageProcessor- The message processor to subscribe- Returns:
- a handle to unsubscribe the
messageProcessor. When unsubscribed it will no longer receive messages.
-