Skip to content

Conversation

Pikolosan
Copy link

✅ Tasks Completed

  1. Project Setup:

    • Forked and cloned the scaffolded repository
    • Configured Java 17 and Maven in the development environment
    • Added required dependencies:
      • spring-boot-starter-data-jpa
      • spring-boot-starter-web
      • spring-kafka
      • h2
      • spring-boot-starter-test
      • spring-kafka-test
      • testcontainers-kafka
  2. Kafka Integration:

    • Implemented a Kafka listener to consume Transaction messages from the configured topic
    • Used provided in-memory Kafka setup for testing
  3. Database Integration:

    • Integrated H2 in-memory database
    • Created TransactionRecord entity to persist valid transactions
    • Validated transactions and updated user balances based on sender/recipient and amount
  4. REST Incentive API Integration:

    • Connected to local /incentive endpoint via RestTemplate
    • Sent validated transactions and received incentive amounts
    • Applied incentives to recipient balances
  5. Balance REST API:

    • Developed GET /balance endpoint
    • Returned user balance as a JSON response
    • Defaulted to 0 if the user did not exist
    • Exposed the API on port 33400

Pikolosan and others added 3 commits June 21, 2025 10:39
Updated pom.xml and added applications.properties file in src/test/resources to provide the general.kafka-topic property, which was missing and causing test failures
Updated Application.yml and created TransacationListner.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant