5G Event Streaming Overview
SBA Gateway can stream HTTP requests and MATRIXX Engine HTTP responses to a Kafka broker. The 5G event streaming applications convert the received JSON objects to ASN.1 binary format for export to Kafka applications and can optionally aggregate and route based on content. The GTP Prime Adapter microservice is provided for sending records from Kafka to a GPRS Tunneling Protocol (GTP) server.
5G event streaming consists of the following container-based applications:
- CDR Kafka Router
- CDR Aggregation Function (CAF)
- CDR ASN.1 Streamer
- ASN.1 sFTP Sink
- GTP Prime Adapter
SBA Gateway sends a
JSON object to the Kafka producer containing three sub-elements: request, response, and event
properties. The producer receives the JSON object and creates a
KafkaProducerRecord
with the partition key, partition ID, timestamp, and
value equal to the ingested JSON.
KafkaProducerRecord Schema Elements describes the event record schema.
Element | Sub-Element | Description |
---|---|---|
body | request | The request from the event record body. |
response | The response from the event record body. | |
headers | key | The partition key (session ID) derived from the original JSON object from SBA Gateway. |
ts | The current timestamp, in milliseconds, from the epoch. | |
partition | The partition ID, as determined by the Apache Kafka Producer default library. |
The KafkaProducerRecord
is then processed two ways. The producer uses a
periodic timer to poll the inbound queue and send the KafkaProducerRecord
to
the Kafka cluster. Errors such as buffer full or delivery expiry cause records to be rejected.
When Kafka is unavailable, the producer continues to retry until a timeout is reached. On timeout, Write to Disk writes the record to a separate log file in a persistent volume (PV). For more information, see the discussion about Write to Disk functionality.
All network events between 5G network functions and SBA Gateway are published to Kafka in JSON format. The CDR Kafka Router routes events/CDRs to multiple output topics based on content and can also add information based on existing content.
The CAF is a Kafka Streams application that aggregates events based on configurable parameters. The output of the CAF is written to another output topic or set of topics in the Kafka cluster.
The CDR ASN.1 Streamer converts JSON events to ASN.1 syntax and then publishes them to an ASN.1 output Kafka topic or set of topics. Finally, the ASN.1 Kafka sFTP application sends events in configurable batches to an sFTP server.
A GTP Prime Adapter is included that can encode JSON CDRs from Kafka and send them to a GTP server, independent of SBA Gateway.
Each of the applications is optional. Any of the applications can write to the inbound topic of any other application to skip processing or provide fan-out.
Figure 1 shows the interaction of SBA Gateway with Kafka and the 5G event streaming applications.