Kafka Producer Configuration Properties

You can configure SBA Gateway as a Kafka producer for sending request and response information using the nf.yaml file, the MATRIXX Helm chart, or environment variables.

Kafka Producer Configuration Options describes the options that can be specified in the nf.yaml file and defaults, where defaults exist.

Table 1. Kafka Producer Configuration Options
Property Description
gateway.external.kafka.enabled Set to true to enable Kafka. The default value is false. This value is overridden by Helm chart value events.kafka.enabled. The default value is false.
gateway.external.kafka.config Kafka producer client configuration options.
gateway.external.kafka.metrics.enabled Set to true to export Kafka metrics. The default value is true.
gateway.external.kafka.connectionRetrySeconds The time in seconds to wait between attempts to connect to Kafka on start up. The default value is 10.
gateway.external.kafka.connectionMaxAttempts The number of times to try to connect to Kafka on start up. After this number of attempts the after this number, the SBA Gateway is marked as ready and further attempts occur in the background. The default value is 5.
gateway.external.kafka.shutdownTimeoutSeconds The time in seconds to close the Apache Kafka producer. The default value is 5.
gateway.external.kafka.shutdownMaxAttempts The number of times to try to close the producer. The default value is 5.
gateway.external.kafka.shutdownRetrySeconds The time in seconds to wait between attempts to close the producer. The default value is 10.
gateway.external.kafka.logger.enabled When set to true, when the Kafka producer cannot send a record to Kafka successfully, it sends that record to a log file. The default value is false.
Note: This value is overridden by the value of the events.kafka.logger.enabled Helm property.
gateway.external.kafka.logger.loggerName The name of the logger configured in the log4j2.xml file. The default value is networkcdr.
gateway.external.kafka.writeQueueMaxSize The maximum number of queued requests when Kafka is unavailable. When this value is exceeded, new requests are written to a log if logger.enabled is set to true. The default value is 0, which disables the threshold check.
Note: When the Write to Disk feature is enabled, MATRIXX Support strongly recommends that gateway.external.kafka.writeQueueMaxSize be set to an appropriate nonzero value. The Write to Disk feature and a nonzero setting for this property ensure that charging data records (CDRs) which cannot be written to Kafka are written to disk instead, with a threshold set to prevent out-of-memory issues if Kafka is unavailable.
Note: If SBA Gateway starts and the Kafka Cluster is not available, for example due to network outage, it continues to attempt to connect with a configurable back off period defined in gateway.external.kafka.connectionRetrySeconds. SBA Gateway continues to process requests and produce CDRs whether connected or not, writing the records to disk.

Offline Options

SBA Gateway can be configured to filter out requests that should not be forwarded to the Charging Server, using rating bypass. It can also be configured to give a positive response when downstream components are unavailable, using backstop functionality. Network CDRs generated from these response sources can then be sent to specified Kafka topics. For more information about SBA Gateway configuration, see the discussion about configuration in MATRIXX 5G Integration.

Kafka Producer Offline Options describes the options that enable Kafka for rating bypass and backstop processing and specify destination Kafka topics.

Table 2. Kafka Producer Offline Options
Property Description
gateway.backstop.kafka.enabled When set to true, enables Kafka for backstop processing. The default value is false.
gateway.backstop.kafka.topic The outbound topic for backstop processing.
gateway.ratingBypass.kafka.enabled When set to true, enables Kafka for rating bypass. The default value is false.
gateway.ratingBypass.kafka.topic The outbound topic for rating bypass.
Note: These options, which extend the producer configuration, require the producer to be enabled to ensure correct functionality.