Trading Service AsyncAPI
The events the Trading Service publishes and the intents it accepts.
The Trading Service is responsible for processing intents from players that want to buy vouchers and crediting players for ingame actions.
| Artifacts | Links |
|---|---|
| Repository | https://gitlab.com/microservice-dungeon/services/trading-service |
| Registry | https://gitlab.com/microservice-dungeon/services/trading-service/container_registry |
| Latest Image | registry.gitlab.com/microservice-dungeon/services/trading-service:latest |
| Changelog | https://gitlab.com/microservice-dungeon/services/trading-service/-/blob/main/CHANGELOG.md |
| AsyncAPI | https://docs.microservice-dungeon.de/docs/reference/trading-service/asyncapi/ |
| Architecture Summary | https://gitlab.com/microservice-dungeon/services/trading-service/-/blob/main/docs/explanations/architecture-summary.md |
| Implementation Details | https://gitlab.com/microservice-dungeon/services/trading-service/-/blob/main/docs/explanations/implementation-details.md |
./mvnw clean compile
This Service uses Maven Surefire and Maven Failsafe to run Tests.
Running Unit Tests:
Either run config UnitTests or
./mvnw test
Running Integration Tests (Requires a valid Docker environment that is accessible to the current shell context)
Either run config IntegrationTests or
./mvnw integration-test
Running all tests (Requires a valid Docker environment that is accessible to the current shell context):
Either run config AllTests or
./mvnw verify
Use the local dev env as described in its readme.
run application (local-dev) or using maven (you need the dev-profile to connect to the local dev environment):
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
The pipeline runs on all pushes to main and open merge requests:
mvn testVersions follow semantic versioning (Major.Minor.Patch). The pipeline analyzes commit messages since
the last release to determine the version bump. Only the highest-priority change triggers a bump
(e.g., 10 fixes + 2 features = 1 minor version bump).
Commit message keywords:
| Keyword(s) | Increments |
|---|---|
breaking, major, BREAKING CHANGE |
Major |
feat, minor |
Minor |
fix, patch |
Patch |
perf, refactor |
No bump configured (used for release notes grouping) |
| Others | Hidden in changelog / no bump configured |
Important: Releases only happen on main. Merge request pipelines run in dry-run mode to
preview the next version.
Images are tagged differently based on context:
<version> and latest<commit-sha>SNAPSHOT-<commit-sha>The pipeline uses GitLab’s Dependency Proxy to cache docker images and prevent pull rate limits from docker hub.
The base image eclipse-temurin:21 requires authentication, which is handled in the dependency proxy settings
of the organization. We have a docker hub account registered under th-koeln@innovation-hub.de / thkarchilab.
You can use the credentials with the variables $CI_DEPENDENCY_PROXY_USER and $CI_DEPENDENCY_PROXY_PASSWORD.
Below you can find the metrics as they show up in Prometheus (_ instead of .)
| Metric Name | Description |
|---|---|
| service_execution_time | Execution time of application use cases (timer, percentile histograms). Tagged with usecase name. |
| listener_execution_time | Execution time of Kafka listeners. Tagged with listener name. |
| events_published_to_dlt | Number of events published to the dead letter topics. Tagged by topic name (system, intents). Tagged by topic name (system, intents) and Exception type. |
| robots_bought | Total number of robots purchased across all games. |
| upgrades_bought | Total number of upgrade levels purchased (tagged by upgradeType) across all games. |
| encountered_duplicates | Total number of duplicate sequence numbers encountered across all games. |
The events the Trading Service publishes and the intents it accepts.