SubscribingEventProcessor
, or Subscribing Processor for short, is a type of Event Processor. As any Event Processor, it serves as the technical aspect to handle events by invoking the event handlers written in an Axon application.SubscribableMessageSource
. The SubscribableMessageSource
is an infrastructure component to register a Subscribing Processor too.SubscribableMessageSource
, the message source gives the events to the SubscribingEventProcessor
in the order they are received. Examples of a SubscribableMessageSource
are the EventBus
or the AMQP Extension. Both the EventBus
and AMQP Extension are simple message bus solutions for events.SubscribableMessageSource
and thus the Subscribing Processor an approach to only receive current events. Operations like replaying are, therefore, not an option for any Subscribing Processor as long as the SubscribableMessageSource
follows this paradigm.EventBus
is, for example, used as the message source, this means that the event publishing thread is the same one handling the event in the Subscribing Processor.SubscribingEventProcessor
is not the default in Axon Framework.Subscribing Processor Use CasesAlthough theSubscribingEventProcessor
does not support easy parallelization or replays, there are still scenarios when it is beneficial.
SubscribingEventProcessor
, you can use the usingSubscribingEventProcessors
method:registerSubscribingEventProcessor
is used:.
, use the map notation:SubscribingEventProcessor
will have it bubble up to the publishing component of the event. Providing the exception to the event publisher allows the publishing component to deal with it accordingly.