RE: Message retry and backoff
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Everytime. that is - everytime the driver returns a message to the bearerbox with a non-terminal error. otherwise the message is discarded anyway. -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. Excellent day for putting Slinkies on an escalator. -----Original Message----- From: Nisan Bloch [mailto:[email protected]] Sent: Tuesday, October 22, 2002 10:48 PM To: Oded Arbel; Kannel-devel (E-mail) Subject: Re: Message retry and backoff hi sounds good.. Under what conditions do you retry? Nisan At 04:13 PM 10/22/02 +0200, Oded Arbel wrote: Hi list. we added a patch to Kannel to enable message retry and backoff. it was quite simple really, but I'm pretty sure it can mess things up, so I would like to get suggestions as to how to properly handle this . it goes something like this : - we add to the message structure to integers, retry and delay. - whenever smscconn_send() is called on a message, and before it stores that message in the driver's queue it will increment the retry field by one, and add to the delay field a configured number of seconds (we set it currently to 60) times the number of retries (this achieving the backoff effect). - sms_router(), before calling smsc_rout() we do this : <snip> if (msg->sms.retry > BB_SMSCCONN_MAX_RETRY) { warning(2, "Message has too many retries - consider it a failure"); bb_smscconn_send_failed(NULL, msg, SMSCCONN_FAILED_DISCARDED); ret = 0; continue; } if (msg->sms.delay + msg->sms.time > time(NULL)) { debug("bb.sms", 0, "Message is delayed - will send later, message retries %d", msg->sms.retry); list_produce(outgoing_sms, msg); ret = 0; continue; } </snip> the ret=0 emmulates the effect of smsc_rout() returning after not founding any available drivers. comments please ? -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. -- Pulchritude possesses solely cutaneous profundity.