For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

GTP Prime errors

GTP Prime (GTP') is the protocol used by CDF Sender to transfer Charging Data Records (CDRs) to the Charging Gateway Function (CGF) over the Ga reference point. Each GTP Prime Data Request message contains a sequence number that uniquely identifies the request and allows matching it with the corresponding response.

The GTP Prime sequence number is a 16-bit unsigned integer (0-65535) that wraps around after reaching its maximum value. CDF Sender maintains a separate sequence number counter for each CGF connection. When sending a CDR, CDF Sender assigns the next available sequence number, increments the counter, and waits for a GTP Prime Data Response with the matching sequence number.

CDF Sender behavior during CDR delivery is controlled by these parameters:

  • spec.config.retries - number of times to retry sending a CDR if no response is received (default: 1). For Helm chart configuration: sender.retries
  • spec.config.responseTimeout - time in milliseconds to wait for a GTP Prime Data Response before timing out (default: 1000). For Helm chart configuration: sender.response_timeout
  • spec.config.echo - interval in milliseconds between GTP Prime Echo Requests to check CGF availability (minimum: 60000, default: 60000). For Helm chart configuration: sender.echo

CDF Sender consumes CDRs from a Cennso Data Mesh (CDM) work queue service with workqueue retention policy. This policy keeps messages in the stream until they are explicitly acknowledged:

  • ack (acknowledge) - CDF Sender confirms successful CDR delivery to CGF. CDM removes the message from the stream permanently.
  • nack (negative acknowledge) - CDF Sender indicates delivery failure. CDM makes the message available for redelivery to the same or another consumer.

When CDF Sender nacks a message, CDM redelivers it after the configured ackWait timeout (default: 30 seconds). This ensures CDRs are not lost even when CGF is temporarily unavailable.

Error scenarios

The following diagrams show various error scenarios and their consequences. For brevity, CDF Sender is referred to as CDF.

No connection available

When no CGF connection is available (all CGFs are marked unavailable due to failed echo requests), CDF Sender immediately nacks the CDR without consuming a sequence number:

As a result, the CDR is returned to the work queue for redelivery. No sequence number is consumed. This protects CDF Sender from exhausting sequence numbers when CGF is unreachable.

No response case

When CDF Sender sends a CDR but receives no response within the configured timeout, it retries using the same sequence number. After exhausting all retries, it nacks the CDR.

As a result, the CDR is returned to the work queue. Sequence number 1 is consumed but can be reused after the sequence counter wraps around (after 65535 other CDRs). The CDR will be redelivered by CDM after the ackWait timeout.

With default settings (1 retry, 1000ms timeout), CDF Sender waits 2 seconds total before nacking (initial attempt + 1 retry).

Response timeout too short for CGF

When the configured responseTimeout is shorter than the actual CGF processing time, CDF Sender times out prematurely, retries with the same sequence number, and eventually nacks the CDR. If the CGF response arrives later while CDF Sender has moved to processing another CDR, the late response is matched to the wrong CDR (now reusing that sequence number).

As a result, CDR2 is incorrectly nacked even though it was never acknowledged by CGF. CDR1 was actually delivered to CGF but CDF Sender doesn't know this. Both CDRs will be redelivered by CDM, potentially causing duplicate CDR1 in CGF.

To avoid this, set responseTimeout to at least twice the expected CGF processing time plus network round-trip time. Monitor the ercdf_cdr_response_lost_total metric to detect timeout issues.

Sequence number wraparound collision

This is a rare scenario that occurs when CGF response time is extremely long and the sequence number counter wraps around (after 65535 CDRs) before the original response arrives.

As a result, CDR65536 is incorrectly acknowledged to CDM and permanently removed from the queue without being delivered to CGF. The actual response was for CDR1 (sent 65536 CDRs earlier). CDR65536 is lost.

With default configuration (retries=1, responseTimeout=1000ms), this requires CGF to take more than 36 hours to respond:

  • Time per CDR cycle = (1000ms initial + 1000ms retry) = 2000ms
  • CDRs before wraparound = 65536
  • Total time = 65536 × 2000ms = 131,072,000ms ≈ 36.4 hours

To avoid this:

  • Ensure CGF responds within reasonable time (seconds, not hours)
  • Set responseTimeout longer than maximum expected CGF processing time
  • Monitor CGF health using the ercdf_gtp_prime_total{name="echo_response"} metric
  • If CGF consistently takes hours to respond, increase echo interval and responseTimeout, but investigate CGF performance issues