Re: Message retry and backoff

Nisan Bloch <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
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
><mailto:[email protected]>[email protected]
>
>+972-9-9581711 (116)
>+972-67-340014
>
>::..
>-- Pulchritude possesses solely cutaneous profundity.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.