Senior Java Developer - Live Coding Assessment
Objective
Build a Cloud-Ready Order Processing Service using Java 17, Spring Boot, JPA/Hibernate, Kafka,
REST APIs, and Docker.
Functional Requirements
• Create Order API: POST /orders
• Get Order API: GET /orders/{id}
• Store orders in database (PostgreSQL or H2)
• Publish [Link] event to Kafka after order creation
• Consume event and update order status (COMPLETED or FAILED)
• Implement retry mechanism (3 attempts) and Dead Letter Queue (DLQ)
Technical Constraints
• Use Java 17 features (record, switch expressions, Optional properly)
• Use Streams API where appropriate
• Proper use of @Transactional
• DTO separation from entities
• Global exception handling using @ControllerAdvice
• Proper layering (Controller, Service, Repository)
• Unit tests required
• Dockerize the application
Evaluation Criteria
• Architecture & SOLID principles
• Core Java expertise
• Spring Boot best practices
• JPA/Hibernate optimization (avoid N+1)
• Kafka configuration & idempotency handling
• Cloud readiness (Docker, health checks, environment configs)
Live Coding Extension (Advanced)
Add idempotency support using 'Idempotency-Key' header. Duplicate keys should not create
duplicate orders and must return existing order.
README Requirements
• How to run locally
• Architecture diagram
• Design decisions and trade-offs
• Future improvements