GH-342 - Allow disabling event externalization.
We now expose spring.modulith.events.externalization.enabled that can be set to false to disable the event externalization completely. Useful in test cases, for example.
This commit is contained in:
@@ -77,6 +77,15 @@ public interface EventExternalizationConfiguration {
|
||||
return new Selector();
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables event externalization by not matching any events at all.
|
||||
*
|
||||
* @return will never be {@literal null}.
|
||||
*/
|
||||
public static EventExternalizationConfiguration disabled() {
|
||||
return externalizing().select(__ -> false).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* A {@link Predicate} to select all events annotated as to be externalized. The currently supported annotations are:
|
||||
* <ul>
|
||||
|
||||
Reference in New Issue
Block a user