-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-??? - Initial prototype to automatically externalize events.
We now provide an SPI to plug custom implementations to externalize events that match an EventExternalizationConfiguration (EEC) into messaging technology. The first implementation of that API is based on Spring Kafka to consume a KafkaTemplate and translate events into Kafka messages.
- Loading branch information
Showing
30 changed files
with
1,340 additions
and
3 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
spring-modulith-api/src/main/java/org/springframework/modulith/Externalized.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.modulith; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import org.springframework.core.annotation.AliasFor; | ||
|
||
/** | ||
* Marks domain events as to be externalized. | ||
* | ||
* @author Oliver Drotbohm | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.TYPE }) | ||
public @interface Externalized { | ||
|
||
/** | ||
* The logical target name. Will default to a strategy defined by configuration if empty. | ||
* | ||
* @return | ||
* @see #target() | ||
*/ | ||
@AliasFor("target") | ||
String value() default ""; | ||
|
||
/** | ||
* The logical target name. Will default to a strategy defined by configuration if empty. | ||
* | ||
* @return | ||
* @see #value() | ||
*/ | ||
@AliasFor("value") | ||
String target() default ""; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.springframework.modulith</groupId> | ||
<artifactId>spring-modulith-events</artifactId> | ||
<version>1.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<name>Spring Modulith - Events - API</name> | ||
<artifactId>spring-modulith-events-api</artifactId> | ||
|
||
<properties> | ||
<module.name>org.springframework.modulith.events.api</module.name> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.springframework.modulith</groupId> | ||
<artifactId>spring-modulith-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.