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
| Service | Protocol | Purpose | Key calls / queues |
|---|---|---|---|
| hbf-core | HTTP (hbf-core-api) | Org/tenant data deletion, audit log deletion | Service token (HBF_CORE_ACCESS_TOKEN) |
| AWS S3 / MinIO | SDK | Paginate and delete tenant attachments under {orgId}/{tenantId}/attachments/ prefix older than retention window | ListObjectsV2Command, DeleteObjectsCommand. Supports MinIO via MINIO_ENDPOINT |
Called By
Daemon service. Not called by other services.
Daemon Loop
- Polls hbf-core for orgs/tenants with
dataRetentionPeriodandauditLogsRetentionPeriodset - 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
| Target | Auth | Env Vars |
|---|---|---|
| hbf-core | Service token (HBF_CORE_ACCESS_TOKEN) | HBF_CORE_URL, HBF_CORE_ACCESS_TOKEN |
| AWS S3 / MinIO | AWS credentials or MinIO credentials | AWS_*, MINIO_ENDPOINT |
Additional env vars: EXECUTION_INTERVAL_IN_HOURS, THRESHOLD_OF_DELETION_RETIRES
Flows Involving This Service
Supporting daemon. No primary flow.