Skip to content

Add queue and worker for webhook announcements #1041

Description

@JoeCap08055

Description

Currently, webhook notifications for completed on-chain transactions are sent in-line in each processing module that implements it (via a common BaseWebhookService). This processing (duplicated at each call site) does the following:

for (configurable retry count) {
  try {
    call `BaseWebhookService`
    break
  } catch (err) {
    increment retry counter
  }
}
  1. Although BaseWebhookService monitors the health endpoint of the webhook server, that status is not used anywhere to inform the try/retry logic
  2. The retry attempts happen immediately with no exponential backoff
  3. There is no mitigation/recovery/retry path beyond the configured retry attempts

Suggested Enhancements

  1. Move this logic into a BaseWebhookService method
  2. Re-implement using a queue & worker (perhaps make BaseWebhookService the worker?)
  3. Implement exponential backoff
  4. Do not attempt to send a notification (and fail) if the service is known to be unhealthy
  5. Ensure that the periodic health check is started when the service is unhealthy

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions