add order command query for test in project and add consumer kfka for test event driven read model design pattern
dont forget change implementation of kafka consumer to list of values
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
package com.example.mmad.testapp.event;
|
||||
|
||||
public class OrderCreatedEvent {
|
||||
private final Long orderId;
|
||||
private final String orderName;
|
||||
private final String description;
|
||||
|
||||
public OrderCreatedEvent(Long orderId, String orderName, String description) {
|
||||
this.orderId = orderId;
|
||||
this.orderName = orderName;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Long getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public String getOrderName() {
|
||||
return orderName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
}
|
@ -1,25 +1,14 @@
|
||||
package com.example.mmad.testapp.event;
|
||||
|
||||
public class UserCreatedEvent {
|
||||
private final Long userId;
|
||||
private final String username;
|
||||
private final String email;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public UserCreatedEvent(Long userId, String username, String email) {
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.email = email;
|
||||
}
|
||||
import java.io.Serializable;
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserCreatedEvent implements Serializable {
|
||||
private Long userId;
|
||||
private String username;
|
||||
private String email;
|
||||
}
|
||||
|
Reference in New Issue
Block a user