Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rate-boss

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, BI, NBKZ.

Service flow (actual)

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
Loading

Quartz execution

For each configured source:

  • ExchangeGrabberMasterJob reads the list of base currencies from rates.*Job.currencies.
  • It spawns ExchangeGrabberJob per currency.
  • Each ExchangeGrabberJob calls the respective ExchangeRateSource, saves the rates, and (for some sources) emits Kafka events.

BI source notes

  • Source: Bank Indonesia
  • Stored BI rate format: target currency per 1000 IDR (e.g. USD per 1000 IDR), i.e. 1000 / (jual_subkurslokal / nil_subkurslokal).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages