Class OutboxEventExternalizer
java.lang.Object
org.springframework.modulith.events.support.EventExternalizerSupport
org.springframework.modulith.events.support.TransportAwareEventExternalizer
org.springframework.modulith.events.support.OutboxEventExternalizer
An
OutboxEventExternalizer that transports events from the outbox to an external target.
This handler is invoked by the outbox processor to externalize events that were previously recorded in the outbox table. It uses the configured transport function to deliver events to their target destination (e.g., message broker, email, SMS).
- Since:
- 2.1
- Author:
- Roland Beisel, Oliver Drotbohm
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOutboxEventExternalizer(EventExternalizationConfiguration configuration, ApplicationEventPublisher publisher, EventExternalizationTransport transport) Deprecated, for removal: This API element is subject to removal in a future version.since 2.2, 2.1.2, for removal in 2.3.OutboxEventExternalizer(EventExternalizationConfiguration configuration, ApplicationEventPublisher publisher, EventExternalizationTransport transport, BeanFactory beanFactory) Creates a newOutboxEventExternalizerfor the givenEventExternalizationConfiguration, transport function andBeanFactoryto resolve routing target and key expressions (which may refer to beans) against the original event. -
Method Summary
Modifier and TypeMethodDescriptionexternalize(Object event) Externalizes the given event.voidexternalizeBlocking(Object event) Externalizes the given event in a blocking way.Methods inherited from class org.springframework.modulith.events.support.TransportAwareEventExternalizer
externalize
-
Constructor Details
-
OutboxEventExternalizer
@Deprecated(since="2.2, 2.1.2", forRemoval=true) public OutboxEventExternalizer(EventExternalizationConfiguration configuration, ApplicationEventPublisher publisher, EventExternalizationTransport transport) Deprecated, for removal: This API element is subject to removal in a future version.since 2.2, 2.1.2, for removal in 2.3. UseOutboxEventExternalizer(EventExternalizationConfiguration, ApplicationEventPublisher, EventExternalizationTransport, BeanFactory)instead.Creates a newOutboxEventExternalizerfor the givenEventExternalizationConfigurationand transport function.- Parameters:
configuration- must not be null.publisher- must not be null.
-
OutboxEventExternalizer
public OutboxEventExternalizer(EventExternalizationConfiguration configuration, ApplicationEventPublisher publisher, EventExternalizationTransport transport, BeanFactory beanFactory) Creates a newOutboxEventExternalizerfor the givenEventExternalizationConfiguration, transport function andBeanFactoryto resolve routing target and key expressions (which may refer to beans) against the original event.- Parameters:
configuration- must not be null.publisher- must not be null.beanFactory- must not be null.- Since:
- 2.2, 2.1.2
-
-
Method Details
-
externalize
Description copied from class:EventExternalizerSupportExternalizes the given event.- Overrides:
externalizein classEventExternalizerSupport- Parameters:
event- must not be null.- Returns:
- the externalization result, will never be null.
-
externalizeBlocking
Externalizes the given event in a blocking way.- Parameters:
event- must not be null.- See Also:
-