heyuall / Java-Microservices-CQRS-Event-Sourcing-with-Kafka

Udemy - Sean - Java Microservices: CQRS & Event Sourcing with Kafka

Home Page:https://www.udemy.com/course/java-microservices-cqrs-event-sourcing-with-kafka/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java-Microservices-CQRS-Event-Sourcing-with-Kafka

1

You can point to Postgres DB (treat as a read db)

Open Bank Account

curl --location --request POST 'http://localhost:5001/api/v1/openBankAccount' \
--header 'Content-Type: application/json' \
--data-raw '{
    "accountHolder": "john Doe",
    "accountType": "SAVINGS",
    "openingBalance": 50.0
}'

Response:

{
    "message": "Bank account creation request completed successfully!",
    "id": "0266c886-8267-4e9c-96ed-3dfb66aac4c4"
}

Screenshot 2022-07-30 at 2 41 30 PM

Screenshot 2022-07-30 at 2 41 40 PM

Screenshot 2022-07-30 at 2 41 52 PM

Screenshot 2022-07-30 at 2 44 42 PM


Deposit Funds

curl --location --request PUT 'http://localhost:5001/api/v1/depositFunds/0266c886-8267-4e9c-96ed-3dfb66aac4c4' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 150.0
}'

Response:

{
    "message": "Deposit funds request completed successfully!"
}

Screenshot 2022-07-30 at 2 47 25 PM

Screenshot 2022-07-30 at 2 47 43 PM

Screenshot 2022-07-30 at 2 47 54 PM

Screenshot 2022-07-30 at 2 49 04 PM


Withdraw Funds

curl --location --request PUT 'http://localhost:5001/api/v1/withdrawFunds/0266c886-8267-4e9c-96ed-3dfb66aac4c4' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 15.0
}'

Response: Screenshot 2022-07-30 at 2 55 24 PM Screenshot 2022-07-30 at 2 55 50 PM Screenshot 2022-07-30 at 2 56 21 PM Screenshot 2022-07-30 at 3 04 24 PM


Close Account

DELETE http://localhost:5001/api/v1/closeBankAccount/0266c886-8267-4e9c-96ed-3dfb66aac4c4

Screenshot 2022-07-30 at 3 08 22 PM

Screenshot 2022-07-30 at 3 08 35 PM

Screenshot 2022-07-30 at 3 09 12 PM


Account Lookup

GET -> http://localhost:5002/api/v1/bankAccountLookup/

Response:

{
    "message": "Successfully returned 2 bank account(s)!",
    "accounts": [
        {
            "id": "9e9e8bf3-65a7-4d6c-9ac1-de79c52017a7",
            "accountHolder": "Jane Doe",
            "creationDate": "2022-07-30T09:44:06.971+00:00",
            "accountType": "CURRENT",
            "balance": 200.0
        },
        {
            "id": "fc949c5e-a3ec-4b2a-ad75-eeed3a150998",
            "accountHolder": "Mike Doe",
            "creationDate": "2022-07-30T09:44:15.761+00:00",
            "accountType": "SAVINGS",
            "balance": 300.0
        }
    ]
}

Find By Account Id

GET -> http://localhost:5002/api/v1/bankAccountLookup/byId/9e9e8bf3-65a7-4d6c-9ac1-de79c52017a7

Response:

{
    "message": "Successfully returned bank account!",
    "accounts": [
        {
            "id": "9e9e8bf3-65a7-4d6c-9ac1-de79c52017a7",
            "accountHolder": "Jane Doe",
            "creationDate": "2022-07-30T09:44:06.971+00:00",
            "accountType": "CURRENT",
            "balance": 200.0
        }
    ]
}

Find By Account Holder Id

GET -> http://localhost:5002/api/v1/bankAccountLookup/byHolder/Jane Doe

GET -> http://localhost:5002/api/v1/bankAccountLookup/withBalance/GREATER_THAN/50


Restore Read DB

GET -> http://localhost:5001/api/v1/restoreReadDb

About

Udemy - Sean - Java Microservices: CQRS & Event Sourcing with Kafka

https://www.udemy.com/course/java-microservices-cqrs-event-sourcing-with-kafka/


Languages

Language:Java 100.0%