Published events are transactionally captured in an outbox-table
[demos/spring/data-jdbc] / src / main / java / de / juplo / boot / data / jdbc / UserEvent.java
index 3693ebf..306a541 100644 (file)
@@ -1,28 +1,14 @@
 package de.juplo.boot.data.jdbc;
 
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.ToString;
-import org.springframework.context.ApplicationEvent;
+import de.juplo.kafka.outbox.OutboxEvent;
 
 import java.time.ZonedDateTime;
 
 
-@Getter
-@EqualsAndHashCode
-@ToString
-public class UserEvent extends ApplicationEvent
+public class UserEvent extends OutboxEvent
 {
-  private final String key;
-  private final UserStatus status;
-  private final ZonedDateTime time;
-
-
   public UserEvent(Object source, String key, UserStatus status, ZonedDateTime time)
   {
-    super(source);
-    this.key = key;
-    this.status = status;
-    this.time = time;
+    super(source, key, status, time);
   }
 }