How miklemkhlv/mdmgeneratorprofile works
This Go service generates MDM-shaped citizen and organization data, sends it through RabbitMQ, and processes incoming MDM records for change tracking. Its principal workflow is mode-driven generation and publishing, followed by asynchronous lookup/enrichment and Redis persistence; during graceful shutdown it compares stored versions and emits composition results and Allure artifacts. The sampled entry point and services establish the orchestration and comparison flow; search internals and job implementations were not sampled, so their finer-grained wiring is not expanded.
Main entry points: main.go App orchestration · compasitionService.go Version comparison · rabbit.go RabbitMQ adapter · redis.go Redis repository
Components 20
Data generation
- Generation jobs
internal/jobs/jobs.go - Record generator
internal/generator/generator.go - MDM models
model/model.go
Messaging
- App orchestration
cmd/app/main.go - Runtime config
config/config.go - RabbitMQ adapter
internal/broker/rabbit/rabbit.go - Log writer
internal/logs/writer.go
Search and storage
- Search worker
internal/service/search/searchService.go - Search pipeline
internal/service/search/stepsPipline.go - MDM lookup client
internal/service/search/http.go - Redis repository
internal/reposytory/redis.go - Version cache
Comparison and reporting
- Change DTOs
model/dto - Version comparison
internal/service/compasition/compasitionService.go - Comparison logic
model/dto/composition_generated.go - Allure results
pkg/allure/allure.go
Other components
- Operator
- RabbitMQ
- Allure report service
- Log files
Connections 23
- Operator → App orchestration: starts
- App orchestration → Runtime config: loads
- App orchestration → Generation jobs: selects mode
- App orchestration → RabbitMQ adapter: starts consumer
- App orchestration → RabbitMQ adapter: publishes records
- RabbitMQ adapter → RabbitMQ: consumes and publishes
- RabbitMQ → RabbitMQ adapter: delivers messages
- App orchestration → Search worker: starts worker
- Search worker → Search pipeline: runs pipeline
- Search pipeline → Redis repository: reads and writes
- Search pipeline → MDM lookup client: looks up MDM
- MDM lookup client → Operator: queries MDM service
- Redis repository → Version cache: reads and writes
- App orchestration → Version comparison: runs at shutdown
- Version comparison → Redis repository: scans and reads
- Version comparison → Redis repository: deletes processed keys
- Version comparison → Change DTOs: decodes changes
- Version comparison → Comparison logic: builds comparison
- Version comparison → Allure results: writes results
- Allure results → Allure report service: provides result files
- App orchestration → Log writer: runs writers
- Version comparison → Log writer: emits composition logs
- Log writer → Log files: writes