If the SMS router fails to get a response when it attempts to send an SMS message, it keeps retrying to sending the message according to a predefined short-term retry schedule. Mobile operators can configure the schedule by setting a value for the following registry key.
The key value is a string that contains a list of integer values, each representing the successive delay between retries. The default setting consists of the following five values: "1 5 10 30 60". The number of values tells the SMS router how many times it should retry sending the SMS message (five times by default), and the actual values specify the delay between retries.
The SMS router has a configurable timeout. By default, it waits five minutes for the RIL. If you configure the SMS router with a timeout value that is shorter than the RIL driver's timeout, then the SMS router will always beat the RIL driver timeout.
不久前也在处理同样的问题,消息本身是没有属性去标识它本身是否被发送的(Maybe there is, but it's hiding from everyone :-) )
我认为应该要有一个发送消息到任务队列(要支持序列化和反序列化),提交到OutBox的消息在队列里创建一个对应的item,消息的发送由Worker线程去完成。
处理消息发送的时机有两个
1.点击发送时,调用 IMessage->SubmitMessage 将消息提交到 OutBox,这时通过 AdviseSink 进行消息处理
2.在 Messaging Transport 被加载的时候要创建 Worker 线程去发送OutBox 内还没有发送的邮件