Skip to content

TP+ debugging and observability

This page explains the TP+ logging facilities and diagnostic helper functions available for inspecting logs and monitoring publisher and subscriber activity.

  • Log categories: Use the TP, TPP, TPPUB, and TPSUB logging facilities to filter startup/registration, core buffer, publisher, and subscriber events respectively.
  • Diagnostic helpers: The EMS message layer exposes d.getMsg, d.getLogInfo, d.getMsgPos, and d.readLog functions so administrators can peek into log files, resolve positions to file offsets, and export message tables for manual inspection.
  • TP+ helpers: The TP+ core exposes scanLog, scanLogRcv, scanLogEOL, showLog, stats, and parsePos so you can replay and inspect parts of the log, verify stream positions, and sanity-check recovery data before and after operational changes.

TP log backups

In some implementations, in a single-node system where there is no fail-over option, it may be desirable or necessary to maintain a secondary copy of the TP logs for recovery purposes. Under normal circumstances, the primary TP's logs support log replay for processes as part of system recovery. In the event that the TP logs were lost or compromised in a problem scenario, the system may be exposed to short-term data loss.

To mitigate this, you can configure a secondary thread on the TP+ process to write a second set of TP logs in a configurable location for storage in the event they are required. The writing of these files is done in real time, in the same manner as the main TP logs. In a recovery scenario, this backup set of logs could be used to support log replay if the primary TP's logs were unavailable or unrecoverable.

Note

Archiving parameters that are set for the stream apply to both the primary and backup TP logs.

Configuration

  • .cfgp.tpLogBackupDir: system parameter representing the directory containing the TP backups for all streams.
  • backup: boolean parameter inside the tp configuration field of ems.yaml indicating whether TP backups should be enabled for the stream.

Next steps