Skip to content

Arch Forum 2026-11-20

Participants: Backend devs, David A (rebtel), Magnus, Victor

Agenda

  • Platform news
  • Renaming Platform namespaces
  • Consolidation of configs
  • SuperStub / Wiremock deprecation
  • Rebtel Risk Overview
  • USD vs USDC

Summary

Platform news

Platform: Migrate to Minority.Platform namespace

(First covered in Arch Forum 2026-01-22)

Today there's a bit of a mix of namespaces in use in the backend. We should consolidate.

Background

Today we have:
- Minority.AreaName.* for each area
- Majority.Platform.* for "modern" platform nugets
- Rebtel.Core.Infrastructure.* for old platform nugets
- Bank.Platform.* for be-bank-platform nugets
- MoneyFlow.*, MoneyIn.*, MoneyOut.* and Risk.* for Rate, MoneyFlow Ach, Psp and Remittance

Our goal should be to have everything under Minority.*.

  1. Minority.AreaName.* is already good
  2. Majority.Platform.* should be Minority.Platform.*
  3. Rebtel.Core.Infrastructure.* should be Minority.Platform.*
  4. Bank.Platform.* should also be Minority.Platform.*
  5. MoneyFlow.*, MoneyIn.*, MoneyOut.* and Risk.* should ideally migrate as well

(The above list in priority order.)

Consolidation of configs

Today we have these config repos:

  • product-datasheets
  • be-configuration
  • be-cde-configuration
  • be-hse-configuration
  • be-mf-configuration
  • be-risk-configuration

We should consolidate them into these:

  • be-configuration
  • be-cde-configuration
  • be-hse-configuration

product-datasheets, be-mf-configuration and be-risk-configuration can all be merged into be-configuration

SuperStub / Wiremock deprecation

Today some repos use a platform library called Rebtel.Core.Infrastructure.SuperStub, which is a wrapper around WireMock.Net. A long time ago we decided against using this method of mocking for our ITP tests. Victor is working on removing it fully.

Rebtel Risk Overview

Open the Risk overview slide deck — use arrow keys to navigate, or print to PDF.

The base idea is: One codebase, deployed as two instances, one for Rebtel one for Majority.

  • The needs of Majority and Rebtel are in many ways very similar. E.g. both have to fight SMS fraud.
  • Rebtel will help with Risk development and new functionality only needs to be developed once.
  • We can learn from each other, i.e. Majority have a good model for SMS fraud handling, Rebtel have a good online machine learning model.
  • Nick is leading the combined Risk from product.

Diagram Rebtel Risk

Red: Rebtel-owned systems. Sky blue: Majority-owned infrastructure and services, including the Rebtel Risk deployment and its dedicated DB and KeyVault.

flowchart LR
    backend["Rebtel backend"]
    kinesis["Rebtel Kinesis"]
    db[("Rebtel Risk DB")]
    kv["Rebtel Risk KeyVault"]
    risk["Rebtel Risk instance<br/>(Themis)"]
    rabbitmq["RabbitMQ<br/>Rebtel. prefix on exchanges/queues"]
    auditing["Auditing"]
    snowflake[("Rebtel Snowflake")]
    bigquery[("BigQuery")]
    datadog["Datadog<br/>With tag tenant.id:rebtel"]
    elastic["Elastic<br>With index rebtel-backend-*"]

    backend -->|Calls public Decision endpoint| risk
    kinesis -->|Events| risk
    db --- risk
    kv --- risk
    risk -->|DecisionEvent| rabbitmq
    rabbitmq --> auditing
    auditing -->|Kinesis| snowflake
    auditing -->|PubSub| bigquery
    risk -->|Metrics| datadog
    risk -->|Logs| elastic

    classDef default fill:#ffffff,stroke:#94a3b8,color:#0f172a,rx:6,ry:6
    classDef rebtel fill:#fee2e2,stroke:#dc2626,color:#991b1b
    classDef majority fill:#e0f2fe,stroke:#0ea5e9,color:#075985
    class backend,kinesis,snowflake rebtel
    class risk,db,kv,rabbitmq,auditing,bigquery,datadog,elastic majority
    style risk stroke-width:2px

Deployment pipeline

The deployment pipeline is somewhat complicated, i.e. cicd. The basic idea is that when Risk deploys to stage, then it will deploy both the majority and the rebtel instance. And same in prod, it will deploy both instances.

But the deploy pipeline is still work in progress.

Config

Risk is configured in be-risk-configuration. There are separate folders for rebtel and majority, and each such folder contain a subfolder for each environment.

Majority risk instance uses the product-datasheets repo for product configurations. When commited, a PR is opened with the change to be-risk-configuration. For rebtel we do not do this, the product configuration files are only in be-risk-configuration. (We will migrate all majority configs from the datasheets repo as well at a later time).

Majority risk instances uses the dt-dbt repo for event confiugrations. When committed, a PR is opened with the change to be-risk-configuration. For rebtel we do not do this, the event configuration is edited directly in the be-risk-configuration repo.

DB & KV

  • The rebtel instance of Risk uses prod-r-risk-use2-sqlDb as its DB.
  • The rebtel instance of Risk uses prod-r-risk-kv as its Key Vault.

Argo

The rebtel instance is deployed in the rebtel namespace, and has separate applications in ArgoCD: rebtel-risk and rebtel-risk-configurations

Metrics

  • Risk now have a new tag, tenant.id that can be either rebtel or majority depending on which instance it is.
  • The tenant.id is configured in the app-settings.json file.
  • Example metric Risk.response.count

Logs

The rebtel instance logs to the rebtel-backend-* index. There is also a Dataview called rebtel that includes rebtel instance Otel logs.

Events in / out

  • The majority risk instance listens on the majority PubSub event stream.
  • The rebtel risk instance listens on the rebtel Kinesis event stream.
  • Both instances publishes events to Majority RabbitMq, but the rebtel instance use a Rebtel. prefix on its exchanges/queues.
  • Majority Auditing listens on all events in RabbitMq. It will forward events to the majority PubSub or the rebtel Kinesis based on the tenant event header.

Meeting notes: We need to have it written down who to contact on rebtel side - majority side for issues that might happen with the rebtel risk instance.

USD vs USDC

How to handle USDC?

Meeting notes: A short discussion about how to deal with USDC. Previosuly our idea has been to as much as possible ignore the fact its different from USD. But maybe that will not hold with expanding crypto features like when we allow MTU and Calling. For now MTU seems to work without currency knowledge, but we might need to reconsider later.