In this project,
- There are 3 microservices, when a user created via user-service that service insert a record onto user table(postgre) and it produce an event to user_service.user_created.0 topic.
- Notification-consumer service listen user_service.user_created.0 topic and simulates the logic of sending notification after the event it consumes after notification is sending successfully service insert a record onto couchbase notification bucket.
- User-address-service also listen user_service.user_created.0 topic and it consume events. According to user's address text information it insert a record onto user-address table(postgre)
- Java 11 JDK
- Docker
- Data Grip or any other database GUIs
- Postman
- Before run project you need to start docker desktop
- After docker is up, run the docker-compose.yml (You can find it in the infra-setup folder.)
- After the run docker-compose.yml file you will see docker desktop like this:
- Continue With DB Connection Part
url: jdbc:postgresql://localhost:5432/kafka_example
username: example
password: example
-
Open http://localhost:8091/ on your browser
username: Administrator
password: 123456
-
1) CREATE PRIMARY INDEX `idx_default_primary_notification` ON `notification` 2) CREATE INDEX `id` ON `notification`(`id`)
-
Username: admin Full Name: admin Password: 123456 Verify Password: 123456
-
Check Topic is created or not http://localhost:9090/ (kafka ui)
-
To increase topic partition open http://localhost:9090/ (kafka-ui) and open the topic settings.