If you have received duplicate SMS recently raise up your hand!

By duplicate SMS I mean receiving two identical SMS from the same person. I am on the Safaricom network and this has been the case intermittently for quite some time. As a matter of fact, I cant quite remember when all this started. At least anyone I know on the Safaricom network has received duplicate SMS from the same person.

So I sought answers since am sure Safaricom may not be considerate enough to even fill me in as to what is happening just like they did last time I tried offering  QA services, for free.

Telecommunication networks are essentially Information systems. This means there is a high level of integration of various components and services. This of course is to ensure each of these components does what its meant to do best. And at best I would want to imagine there is some form of event based implementation around the sending of text messages. A sample structure would be:

  1. Receive message from User cell phone.
  2. Create message Entry in DB.
  3. Bill the Customer account. In this case reduce their balance or SMS allocation.
  4. Raise an event to be handled by a difference service which does the actual forwarding of the message to the recipient.
  5. Send message,  remove message from queue and update record created in 2.

The implementation above possibly uses  an AMQP service. One major component of message queuing is the issuing of acknowledgement once a message has been processed in this case successfully send to the recipient. Now this is the point where I think the safaricom bug arises.

There is a chance that the message queuing service used by safaricom doesn’t offer the acknowledgement flag whenever a message is successfully forwarded to the recipient. Therefore when the message sending service checks for unsent messages it will still find unacknowledged messages in the queue in which case it tries to send them again. This will result in subsequent sending of a message already send.

Based on that premise then why is it that a mobile subscriber only ends up receiving 2 duplicate messages and not more? This i think Safaricom throttle their retry to only two times such that unacknowledged messages not sent after 2 retries are marked as failed or something.

If this is actually the case then it brings forth a very valid case about just how to scale while keeping within the budgetary constraints for an organization looking to appease it shareholder. The issue of budget here comes in  terms of allocating for the necessary tests in this case load/volume testing.

Whichever the case is the issue, I hope someone is on top of things trying to figure out but until they do, they might wanna consider my hypothesis.

Leave a Reply

Your email address will not be published. Required fields are marked *