**## Take-home Microservices Challenge
This is how we faced the challenge of creating some microservices to consume notifications services.**
- Overview
- Requirements
- Screenshot
- Links
- Built with
- How I did it
- Continued development
- Useful resources
- Author
- Acknowledgments
This notification app has been coded using Spring Boot, Spring JPA, Spring AWS SDK, Spring RabbitMQ,MapStruct, Jackson, Lombok, OpenAPI, H2 DB.
- src
- main
- java
- com/xxx/challenge/notification
- config
- controller
- dto
- entity
- enums
- mapper
- payload
- repository
- services
- exceptions
- com/xxx/challenge/notification
- resources
- db.migration
- test
Requirements
- rabbitMQ running at 127.0.0.1:5672 socket
- H2 database classpath:data/notification
- profile active: dev
- service socket: 127.0.0.1:8095
- Live Site URL: [http://127.0.0.1:8095/swagger-ui/index.html]
package com.gila.challenge.notification.entity.enums;
public enum MessageStatus {
DELIVERED_SMS(1),
DELIVERED_EMAIL(2),
READY_TO_DELIVER(3),
WAITING_EXCHANGE(4);
private final int codeStatus;
private MessageStatus(int codeStatus) {
this.codeStatus = codeStatus;
}
public int getCodeStatus() {
return codeStatus;
}
public static MessageStatus valueOf(int codeStatus) {
for (MessageStatus value : MessageStatus.values()) {
if (value.getCodeStatus() == codeStatus) {
return value;
}
}
throw new IllegalArgumentException("Invalid MessageStatus code");
}
}
- Unit Tests
- Provide a Json to FrontEnd including
- delivery status of each message to frontend
- count of messages consumed by subscriber
- Subscriber Authentication
- Spring JWT-OAuth2
- Messages Pagination
- [https://spring.io] Awesome Java framework!.
- [https://start.spring.io/] Handy startup tool.
- [https://mvnrepository.com] Tools that help tackle the beast
- Website - [https://ferreiras.dev.br] Acknowledgments