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
version: '3' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:6.2.0 | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
volumes: | |
- zookeeper_data:/var/lib/zookeeper/data | |
- zookeeper_logs:/var/lib/zookeeper/log |
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
// Reduce complexity of the code | |
public boolean isOrderValid(Order order) { | |
if (order != null) { | |
if (order.getItems() != null && !order.getItems().isEmpty()) { | |
for (OrderItem item : order.getItems()) { | |
if (item.getQuantity() > 0) { | |
// Validate item | |
} else { | |
return false; | |
} |
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
public class AccountOpenedEvent { | |
private String accountId; | |
private String customerDetails; | |
private String accountOpeningDetails; | |
private int version; // Add a version field | |
} | |
@Component | |
public class AccountOpenedEventHandler { | |
private List<AccountOpenedEventProcessor> processors; |
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
Description | Command | |
---|---|---|