且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apple 推送通知新协议不起作用

更新时间:2023-01-03 14:24:53

您可以考虑使用具有增强消息支持的库来减轻您的负担.

You may consider using library with enhanced message support to ease your burden.

它会捕获失败消息的错误响应,并重新发送被 APNS 丢弃的消息.(在第一次失败后和收到错误响应之前发送时,消息被丢弃)

It will catch error response for failure messages and resent the message which are discarded by APNS. (messages are discarded when sending after failure one and right before error-response is received)

特点:

  • 非阻塞 ssl 套接字连接,无需等待响应即可发送通知.
  • 一个单独的线程,用于不断检查读取连接的错误响应.
  • 发送通知缓冲区,用于重新发送通知失败后发送的通知,或者 apns 关闭任意连接.
  • 更糟糕的情况是,当第一个通知发送失败,1 秒后错误响应响应,同时发送的 999 通知被 APNS 丢弃,所有丢弃的 999 通知将重新发送而不会丢失任何一个.同理,如果通知重发失败,会在失败后重发剩余的重发通知.

性能:

  • 以 1000/秒的吞吐量发送通知