The Transaction Ingestion Service serves as the critical entry point for the Real-Time Financial Risk Assessment & Compliance Platform. It is responsible for securely receiving, validating, and routing financial transactions through the initial processing pipeline.
This microservice ensures that all incoming transactions meets strict structural and business integrity standards before they are propagated to downstream services via event streaming.
- Real-time Ingestion: High-performance REST APIs to accept individual financial transactions.
- Comprehensive Validation:
- Structural: Checks for format, data types, and required fields.
- Business Logic: Verifies customer status, limits, and merchant validity.
- Schema Compliance: Ensures adherence to the defined data model.
- Event-Driven Architecture: Asynchronously publishes transaction events (
transaction-received,transaction-rejected) to Apache Kafka for decoupled processing. - Bulk Processing: Supports batch transaction uploads for high-volume data ingestion.
- Service Discovery: Fully integrated with Netflix Eureka for dynamic service registration and discovery.
- API Documentation: Built-in Swagger UI for easy API exploration and testing.
- Language: Java 17
- Framework: Spring Boot 3.5.7
- Database: MongoDB (Primary data store for transactions and logs)
- Messaging: Apache Kafka (Event streaming)
- Service Discovery: Netflix Eureka Client
- Build Tool: Maven
Ensure you have the following installed and running:
- Java 17 SDK
- Maven 3.8+
- MongoDB (running locally or accessible remotely)
- Apache Kafka (Zookeeper & Broker running)
- Eureka Discovery Server (running on default port 8761)
The service is configured via src/main/resources/application.yaml. Key configurations include:
- Server Port: Configured to
0(random port) for Eureka compatibility. - MongoDB:
spring.data.mongodb.uri - Kafka:
spring.kafka.bootstrap-servers - Eureka:
eureka.client.service-url.defaultZone
-
Clone the repository:
git clone <repository-url> cd transaction-ingestion-service
-
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
Or using the built jar:
java -jar target/transaction-ingestion-service-0.0.1-SNAPSHOT.jar
Once the application is running, you can access the interactive API documentation via Swagger UI:
http://localhost:<port>/swagger-ui.html
(Note: Check the console logs for the assigned random port)
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/transactions/ingest |
Ingest a single transaction |
POST |
/api/v1/transactions/bulk-upload |
Upload a batch of transactions |
The service follows a clean, layered architecture:
- Controller Layer: Handles HTTP requests and response formatting.
- Service Layer: Contains business logic, validation rules, and orchestration.
- Repository Layer: Manages data persistence with MongoDB.
- Event Layer: Handles Kafka message production for system-wide events.
For more detailed information, please refer to: