Docs

Retries

Answer 2xx within 5 seconds

A try succeeds when your server answers any 2xx status within 5 seconds. The 5 seconds cover the DNS lookup, the connection, your answer and its body. Any other answer is a failure, and so is no answer:

  • a 3xx: Telrioz does not follow redirects, so set the final URL;
  • a 4xx or 5xx;
  • a timeout, a refused connection or a TLS error.

Answer first and do the slow work afterwards, for example by putting the event on your own queue.

The URL must be https and must resolve to a public address. Telrioz never calls an http URL or a private address, such as 10.x, 192.168.x or 127.0.0.1.

Retry schedule

After a failed try, the next one comes 10 seconds later, then twice as long after each failure, never more than 3600 seconds (1 hour) apart. 10 seconds is the default first wait. After 15 tries in all, Telrioz gives up on the event. It is then not sent again, but the message's Delivery state is still there: call GET /messages/{id}.

TryWait before this tryTime since the first try
1At once0 s
210 s10 s
320 s30 s
440 s1 min 10 s
51 min 20 s2 min 30 s
62 min 40 s5 min 10 s
75 min 20 s10 min 30 s
810 min 40 s21 min 10 s
921 min 20 s42 min 30 s
1042 min 40 s1 h 25 min 10 s
111 h2 h 25 min 10 s
121 h3 h 25 min 10 s
131 h4 h 25 min 10 s
141 h5 h 25 min 10 s
151 h6 h 25 min 10 s

Times leave out the up to 5 seconds that each try may take.

Skip duplicates by event_id

You can get the same event more than once: for example when your 2xx took longer than 5 seconds, or was lost on the way back. Every try of one event has the same event_id, in the body and in the x-telrioz-event-id header. Keep the event_ids you have handled, and answer 2xx without doing anything for one you have seen.

Events can arrive out of order

Each event is retried on its own, so a retried event can come after a later one. This matters for SMPP, which sends sent and then a final state for each part. A final Delivery state never changes, so never let sent overwrite a final state you already have.