Configuration Example

The following is an example configuration that provides routing to two CHF instances based on Subscription Permanent Identifier (SUPI) values:

scaling:
  main:
    mode: manual
    instances: 4
 
http:
  port: 8080
  operationsPort: 8081
 
http2:
  clearTextUpgrade: false
 
baseUrl: "https://chf.matrixx.com"
 
shutdown:
  shutdownDelaySeconds: 10
  shutdownMonitorIntervalMs: 300
  shutdownMonitorTimeoutSeconds: 20
 
routes:
  chargingData:
    urls:
      - /nchf-convergedcharging/v2/chargingdata
      - /nchf-convergedcharging/v2/chargingdata/:ref/update
      - /nchf-convergedcharging/v2/chargingdata/:ref/release
      - /nchf-convergedcharging/v2/chargingdata/:endpoint/:ref/update
      - /nchf-convergedcharging/v2/chargingdata/:endpoint/:ref/release
    extractedFields:
      imsi:
        fromMessage:
          jsonPath: $.subscriberIdentifier
          regex: "^imsi\\-(?<value>[0-9]{1,15})$"
      nai:
        fromMessage:
          jsonPath: $.subscriberIdentifier
          regex: "^nai\\-(?<value>.*)$"
    routingRules:
      - targetEndpoint: chf-one
        fieldValueMatchingRules:
          - between:
              fieldName: imsi
              lower: 1
              upper: 10
      - targetEndpoint: chf-one
        fieldValueMatchingRules:
          - between:
              fieldName: nai
              lower: 1
              upper: 10
    defaultEndpoint: chf-two
    locationHeader:
      pattern: "%s/nchf-convergedcharging/v2/chargingdata/%s/%s"
      strategy: PROPAGATE
 
  spendingLimitControl:
    urls:
      - /nchf-spendinglimitcontrol/v1/subscriptions
      - /nchf-spendinglimitcontrol/v1/subscriptions/:ref
      - /nchf-spendinglimitcontrol/v1/subscriptions/:endpoint/:ref
    extractedFields:
      imsi:
        fromMessage:
          jsonPath: $.supi
          regex: "^imsi\\-(?<value>[0-9]{1,15})$"
      nai:
        fromMessage:
          jsonPath: $.supi
          regex: "^nai\\-(?<value>.*)$"
    routingRules:
      - targetEndpoint: chf-one
        fieldValueMatchingRules:
          - between:
              fieldName: imsi
              lower: 1
              upper: 100
      - targetEndpoint: chf-one
        fieldValueMatchingRules:
          - between:
              fieldName: nai
              lower: 1
              upper: 100
      - targetEndpoint: chf-two
        fieldValueMatchingRules:
          - between:
              fieldName: imsi
              lower: 101
              upper: 200
      - targetEndpoint: chf-two
        fieldValueMatchingRules:
          - between:
              fieldName: nai
              lower: 101
              upper: 200
    locationHeader:
      pattern: "%s/nchf-spendinglimitcontrol/v1/subscriptions/%s/%s"
      strategy: PROPAGATE
 
endpoints:
  chf-one:
    baseUrl: http://chf-one:8080
    networkCDRs:
      config:
        bootstrap.servers: kafka:9092
      topic:
        single: chf-one-cdrs
      logger:
        enabled: true
 
  chf-two:
    baseUrl: http://chf-two:8080
    enrichedHeaders:
      - headerName: "X-IMSI"
        fieldName: imsi
 
tracing:
  openTelemetry:
    enabled: true
    endpointUrl: http://otelcol:4317
    traces:
      sampler: TRACEIDRATIO
      ratio: 0.5