Fw: Message retry and backoff

"Rene Kluwen / Chimit Software Solutions" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <00cb01c279e9$a7680c30$1401a8c0@helena>
I'm all for it!

Will sms.retry and sms.delay be configurable? (rethorical question).

-- Rene...

--------
This email message has been automatically scanned for viri using Sophos antivirus.
--------
  ----- Original Message ----- 
  From: Oded Arbel 
  To: Kannel-devel (E-mail) 
  Sent: Tuesday, October 22, 2002 4:13 PM
  Subject: Message retry and backoff


  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.
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.