At 09:40 AM 10/23/02 +0200, you wrote:
Everytime. that is - everytime the driver returns a message to the bearerbox with a non-terminal error. otherwise the message is discarded anyway.
I can think of one place where this might mess things up, but it is external to Kannel. Kannelers might be have written apps that will resend certain messages on certain error conditions. If the backoff and retry is configurable, it could be disabled in Kannel allowing the apps to handle this.
The other comment I have without having seen the code, is that it might be usefull to use the dlr mechanism to notify smsbox and hence external apps of this.
Anychance of posting the code as it is so far?
Nisan
--
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.