Skip to main content

Communication: hbf-data-retention

1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.

Calls Out To

ServiceProtocolPurposeKey calls / queues
hbf-coreHTTP (hbf-core-api)Org/tenant data deletion, audit log deletionService token (HBF_CORE_ACCESS_TOKEN)
AWS S3 / MinIOSDKPaginate and delete tenant attachments under {orgId}/{tenantId}/attachments/ prefix older than retention windowListObjectsV2Command, DeleteObjectsCommand. Supports MinIO via MINIO_ENDPOINT

Called By

Daemon service. Not called by other services.

Daemon Loop

  • Polls hbf-core for orgs/tenants with dataRetentionPeriod and auditLogsRetentionPeriod set
  • Deletes: chat sessions, forms, subscribers, elastic data, audit logs via hbf-core; S3 attachments
  • Interval: EXECUTION_INTERVAL_IN_HOURS (default 6h)
  • Retries: up to THRESHOLD_OF_DELETION_RETIRES (default 1)

Contracts

Inbound

None. This is a daemon with no inbound API.

Outbound

TargetAuthEnv Vars
hbf-coreService token (HBF_CORE_ACCESS_TOKEN)HBF_CORE_URL, HBF_CORE_ACCESS_TOKEN
AWS S3 / MinIOAWS credentials or MinIO credentialsAWS_*, MINIO_ENDPOINT

Additional env vars: EXECUTION_INTERVAL_IN_HOURS, THRESHOLD_OF_DELETION_RETIRES

Flows Involving This Service

Supporting daemon. No primary flow.