TAP3 JSON Kafka CDR Consumer Inputs and Mappings
The TAP3 JSON Kafka CDR Consumer accepts TAP3 JSON message input, deserializes it, and maps it to a MtxDiamRoMsg message.
The supported JSON message input format is defined in the simple-tap312-events.json schema.
TAP3 headers contain metadata for the TAP3 call events, like the UTC time offset
dictionary and currency conversion rules. When converting TAP3 records to TAP3 JSON
records, values that must refer to headers are flattened, for example:
utcTimeoffsetCode
(for example,0
,1
,2
) is replaced withutcTimeOffset
(for example,+0100
and+0200
).charge
is converted to local currency and represents a charging value that MATRIXX Engine accepts.
One Kafka message is mapped to one MtxDiamRoMsg message that is sent to MATRIXX Engine for rating. When mapping to MtxDiamRoMsg, each call event has different required
fields and mapping rules. A unique session is generated for each incoming message for
the
MtxDiamRoMsg.SessionId
field in the following
format:kafka-host_name-app_startup_time;<running-number>
where:- host_name is the name of your Kafka host.
- app_startup_time is the time to start your application.
- <running-number> is the number of pods to run concurrently.
The following fields are added to each mapped MtxDiamRoMsg message to mark the request as
an offline charging request:
MtxDiamRoMsg.diamOp
with a value of271
.MtxDiamRoMsg.applicationId
with a value of3
.
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.
For more information about the inputs and mappings for each supported TAP3 event format, see the discussion about mobile-originated call inputs and mappings, mobile-terminated call inputs and mappings, GPRS call inputs and mappings, messaging event inputs and mappings, and mobile session inputs and mappings.