Skip to main content

Delivery Reliability (Retries · Idempotency · Ordering)

Success criterion — 2xx required​

A delivery is considered successful only when your webhook returns 2xx. Anything else (4xx, 5xx, timeout, network error) is retried.

warning

4xx responses are retried too. If you received and processed the request normally, always return 2xx — otherwise the same event keeps being re-sent.

Retry policy​

The policy below applies to the hosted Gateway (TalkBridge Center).

  • Delivery semantics: at-least-once (delivered one or more times — duplicates possible).
  • Backoff: 1s → 5s → 30s → 2m → 10m, 5 attempts in total.
  • The Gateway persists its delivery ledger, so it resumes incomplete deliveries even after a Gateway restart.
  • If all 5 attempts fail, that delivery is marked Failed and the Gateway status is reported as Degraded (overall operation continues).
The CLI relay uses lightweight retries

The CLI Gateway's webhook relay uses lightweight in-memory retries — on transient failure it tries up to 3 times with a 1s → 3s backoff and does not resume from persistence (only while the process is alive). X-Bridge-Delivery-Id is identical across retries, so apply the same idempotency handling on the receiving side. → CLI Gateway

When you connect for the first time — earlier consultations are delivered too​

Once your Kakao channel is connected, customer consultations start arriving at TalkBridge from that moment. Even if you have not connected a webhook yet, TalkBridge keeps these consultation events and, the moment you connect your webhook for the first time and turn on consultations, delivers the events from that period in order, oldest first. This reduces the chance that consultations received between connecting the channel and connecting the webhook are lost during the switch.

Plan for the following when you build your receiving server.

  • Connect your webhook within 7 days of connecting the channel. If you connect later, or a very large number of consultations builds up in the meantime, older events may not be delivered.
  • Right after you connect, past events arrive in a burst. They carry the same headers and signature as usual, and idempotency applies as usual.
  • Do not reply automatically to past consultations. They may already be closed or several days old. If you run auto-replies or a bot, fetch the content and check the conversation time and whether it has ended before replying.
  • If you connected Discord or Slack (Simple mode) first and were already receiving events there, that period counts as delivered. A webhook you add later receives only the events that arrive after you add it.

Check and recover the switch-over period​

When you connect a channel, Kakao switches the consultation method from KakaoTalk Channel 1:1 chat to SangdamTalk. While this switch is in progress, inbound events may be interrupted for a few seconds on Kakao's side. Consultations that arrive after the switch completes are kept by TalkBridge.

Once your webhook is connected, check the period after the switch once with conversation history.

  1. Query from the time you connected the channel to the time you connected the webhook with from·to. Each call covers at most 7 days.
  2. Skip the lines you already stored from webhooks (same userKey, at and role), and add only the missing lines to your system.
Conversations from before the connection are not included

Conversations you had in KakaoTalk Channel 1:1 chat before connecting the channel are not moved to TalkBridge. You cannot receive them through webhooks or conversation history.

If delivery never succeeded — recover from conversation history​

If every retry failed, or your receiving server was down for a while, you can recover the conversations from that period with conversation history.

  1. Find when delivery stopped (for example, from the start of your server outage until it recovered).
  2. Query that period with from·to. Each call covers at most 7 days.
  3. Skip the lines you already stored (same userKey, at and role), and add only the missing lines to your system. Don't use convId as the de-duplication key, because it can differ depending on the query range.
Recovery only

Conversation history is a backup for filling outage gaps and the onboarding gap. Do not use it as a source for statistics, reports or core consultation features; in normal operation, store the webhooks you receive in your own system.

Idempotency​

Because you may receive the same event more than once, handle it idempotently.

Deduplication keyPurpose
X-Bridge-Delivery-IdRemoves retry duplicates — retries of the same delivery share the same ID
(brand, seq)Logical event uniqueness — based on the journal sequence

Recommended: store X-Bridge-Delivery-Id as the primary key and skip deliveries you have already processed.

seq reuse caveat

If the journal is reset, seq may be reused. For long-term idempotency storage, keying on Delivery-Id is safer.

Ordering​

  • The Gateway tries to preserve send order within a brand, but arrival order can be reversed when retries intervene.
  • If order matters, re-sort by the payload's seq (monotonically increasing).

Checklist​

  • Signature verification failure → 401 (so it keeps failing even when retried)
  • Processed normally → 2xx
  • Skip duplicates by Delivery-Id
  • Filter kind: "agent" echoes
  • Even when processing is slow, respond 2xx quickly and post-process asynchronously (avoids the Gateway timeout)