Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Sports Betting Settlement Trigger Service

A Spring Boot service that simulates sports betting event outcome handling and bet settlement via Kafka and RocketMQ. Submitting an event outcome publishes it to Kafka; a consumer matches pending bets by event ID and forwards them to RocketMQ for settlement.

Tech Stack

Java 25, Spring Boot 3.4, Spring Kafka, Apache RocketMQ, H2 (in-memory), Docker Compose

Prerequisites

  • Docker and Docker Compose

Running

docker compose up --build

Wait for the service to become healthy (port 8889).

Mock RocketMQ mode

Runs the full pipeline without RocketMQ containers — settlement messages are logged instead:

SPRING_PROFILES_ACTIVE=mock-rocketmq docker compose up --build

Usage

Submit an event outcome:

curl -X POST http://localhost:8889/api/event-outcomes \
  -H "Content-Type: application/json" \
  -d '{"eventId":"EVT-001","eventName":"Champions League Final","eventWinnerId":"TEAM-A"}'

The database is pre-loaded with sample bets for EVT-001 and EVT-002.

Tests

./mvnw test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages