Diameter CDR Kafka CDR Consumer

The Diameter CDR Kafka CDR Consumer is an out-of-box extension that consumes plain MtxDiamRoMsg protocol buffer binary files and maps them to MtxDiamRoMsg charging messages for MATRIXX Engine rating.

Note: If different mapping rules are required than what are provided, you must create a custom extension to support the custom mapping rules. For example, custom MtxDiamRoMsg records might have extra fields added, such as TefDiamRoMsg. A new extension is required for each custom MtxDiamRoMsg record. For more information about creating a custom extension, see the discussion about creating a custom Kafka CDR Consumer extension.

The following is an example of the Helm values file for configuring Diameter CDR Kafka CDR Consumer:

global:
  image:
    registry:
      name: harbor.matrixx-services.com
 
image:
  name: "matrixx-kcc/diameter-cdr-consumer"
  version: "5250"
 
replicaCount: 1
 
# Kafka CDR Consumer App configurations
configuration:
  engine:
    host: "engine.host"
    port: 4060
  consumer:
    rate:
      targetTps: 1000
    kafka:
      topic: rerater_topic
      config:
        bootstrap.servers: kafka1:9092,kafka2:9092,kafka3:9092
        group.id: "cg1"
        max.poll.records: 10
  producer:
    kafka:
      topic: reject_topic
      config:
        bootstrap.servers: kafka1:9092,kafka2:9092,kafka3:9092

In this example, image.name points to the Diameter CDR Kafka CDR Consumer image. Update the other values as needed to configure the Diameter CDR Kafka CDR Consumer. For information about the properties, see the information about Kafka CDR Consumer properties.

Inputs and Mappings

The supported input message is the protocol buffer (protobuf) binary message of the MtxDiamRoMsg MDD object (an alternative to compact MDCs (CMDCs)). The protocol buffer binary message is consumed from a Kafka topic, mapped to MtxDiamRoMsg, and sent to MATRIXX Engine for rating.

Note: If rating sequences are important, for example, if there are session-based events for which the ACR start event must be rated before interim events, make sure:
  • When producing to the Kafka topic, the same session events are written to the same Kafka topic partition. To do this, set the same Kafka message key value for events from the same session.
  • In Kafka CDR Consumer Helm chart configurations, set the value of configuration.consumer.kafka.config.max.poll.records to 1. For more information about this property, see the discussion about Kafka CDR Consumer properties.
The following fields are added to each mapped MtxDiamRoMsg message to mark the request as an offline charging request:
  • MtxDiamRoMsg.diamOp with a value of 271.
  • MtxDiamRoMsg.applicationId with a value of 3.

Error Processing

If an error occurs when a Kafka input message is deserialized or rated, a Kafka message in the following format is produced to reject the Kafka topic:
{
  "rejectCode": code,
  "rejectReason": "rejection_reason_or_exception_message",
   src: "incoming_JSON/raw_Kafka_message_causing_the_failure"
}
where the following are the possible error codes and their meanings:
  • -1 — An exception (for example, a connection timeout) occurred when trying to rate the request.
  • -2 — The incoming Kafka message could not be deserialized.
  • Others — A result code was returned by MATRIXX Engine.