sFTP Sink Microservice Deployment
MATRIXX uses the sFTP Sink microservice to upload charging data records (CDRs) to Apache Kafka. These CDRs are first converted from JSON to ASN.1 (ASCII) format. sFTP Sink sends these ASN-1 encoded messages from an Apache Kafka topic. Records are aggregated in a local cache, and each record is pre-pended with a header. Once a certain file size is reached, these records are pre-pended with a header, and the file is uploaded to an sFTP server for processing.
Figure 1 shows the typical sFTP Sink flow.
The microservice is provided in the asn1-kafka-sftp image. The configuration filename is asn1-sftp-sink.yaml. For information about sFTP Sink configuration, see the discussion about ASN.1 sFTP Sink application configuration.
CDR File Format Specification
The files produced by this solution are binary records, each with a header conforming to section 6.1.2 CDR header format of the 3GPP TS 32.297 V15.4.0 (2019-09) technical specification. Each file has a header conforming to section 6.1.1 of the specification.
Figure 2 shows how sFTP Sink prepends a header to each ASN.1 encoded message to prepare them for uploading to sFTP servers.
Topic Routing
Topic routing allows records received for one Apache Kafka topic to be processed apart from records received for another topic.
Sink Topic Routing shows this routing flow.
Each set of records can be uploaded to a distinct directory on the sFTP server. Each route corresponds to one topic, and file aggregation and file stats are kept separate from the other routes. This means that the File Sequence Number and Running Count are distinct for the route.
Routing requires one or more routes to be defined. One of those routes must be the default route. The default route is used when upgrading from prior versions of MATRIXX that do not have routing. When records are in the file buffer, upon an upgrade, the current statistics are transferred to the default route, an the buffer is closed. The closed file is then uploaded to the corresponding remote path that has been defined.
For information about routing and sFTP server configuration, see the discussion about routing and sFTP server configuration.