Rate-boss periodically pulls exchange rates from external sources, stores them in the database, and optionally publishes rate events to Kafka. It also exposes API endpoints to read the latest or historical rates and to convert amounts by timestamp.
Supported sources today: Fixer, CBR, NBKZ.
flowchart TD
subgraph Quartz Scheduler
M[ExchangeGrabberMasterJob<br/>per source] -->|per currency| J[ExchangeGrabberJob]
end
J -->|HTTP fetch| S[ExchangeRateSource<br/>Fixer / CBR / NBKZ]
S -->|rates + timestamp| D[ExchangeDaoService]
D -->|save batch| DB[(PostgreSQL<br/>rb.ex_rate)]
J -->|optional publish| E[ExchangeEventService]
E --> K[(Kafka topic)]
API[ExchangeRateServiceSrv] -->|getExchangeRateData / getConvertedAmount| DB
For each configured source:
ExchangeGrabberMasterJobreads the list of base currencies fromrates.*Job.currencies.- It spawns
ExchangeGrabberJobper currency. - Each
ExchangeGrabberJobcalls the respectiveExchangeRateSource, saves the rates, and (for some sources) emits Kafka events.