Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To avoid blocking the entire message queue when processing webhooks, it is crucial to focus on the signature validation first and handle any additional checks asynchronously.

Recommended Acknowledgment Process:

  • Signature Validation:

    • Objective: Ensure the message is legitimately sent by OneStock.

    • Action: If the signature is valid, immediately return an HTTP 202 Accepted response.

  • Asynchronous Content Validation (if applicable):

    • Any additional checks (e.g., content validation) should be performed asynchronously after acknowledging the message. This prevents delays in processing subsequent webhooks and ensures a smooth message flow.

Key Benefits

  • Prevent Queue Blocking: By acknowledging based solely on signature validation, the message queue remains smooth and uninterrupted.

  • Efficient Processing: Additional content checks can be handled asynchronously, avoiding potential bottlenecks.

...

  • enabled: The default state after creation. Messages are processed normally, triggering the webhook.

  • pausedPaused: Messages are stored while the webhook is paused, either due to an on_failure error or manual intervention. Manual pausing prevents new messages from being processed in a paused state. The behavior of this state depends on the scenario:

    • Manual pause: No messages will be sent until the webhook is manually re-enabled

    . on_failure pausing results on messages being retried till on_failure_recovered or on_deactivation
    • .

    • Automatic pause: This occurs when a message is not acknowledged by the receiver within 15 seconds. In this case, the message will be retried. If the message fails to be acknowledged after the configured number of retries (retries_until_failure), an on_failure notification will be triggered (via email and/or SMS, depending on configuration). If the maximum number of retries is reached without success, the webhook will be disabled. However, if the message is acknowledged before reaching the retry limit, the webhook will automatically resume sending messages (enabled).

  • disabled: The webhook stops functioning and storing messages after an on_deactivation error. It must be manually reactivated.

...