- Create
ContractEventDlqEntity: Add the requested fields. - Update Event Persistence: In
ContractEventIndexerJob, capture failures (and inIndexerServiceif applicable, though the problem describesContractEventIndexerJobhaving events) and save them to DLQ instead of failing the batch. - Implement Retry Worker: Create a cron job that finds pending/retrying DLQ entries, attempts to re-process them, updates attempts and next retry time with exponential backoff. Status changes to
exhaustedafter max attempts. - Idempotency Guard: Replay should successfully insert into
ContractEventusingorIgnore, and update the DLQ record status toresolved. - Operator Endpoint: Add endpoints in an existing controller (e.g.,
AdminController) or a new controller to list DLQ records and trigger manual replay. - Pre-commit Checks: Run tests, linter, formatting.