Giter Club home page Giter Club logo

Comments (7)

RamosLi avatar RamosLi commented on July 28, 2024

不是这样的。我们假设queue有ABCDEF这6条消息,假设第三条C出错了,那么就会跳过C,把DEF重发一遍。所以不会出现你说的情况。

from dbay-apns-for-java.

luffyliups avatar luffyliups commented on July 28, 2024

多谢,我再仔细看一下代码。其实我在研究在你这个基础上,怎么能让发送者知道所有发送任务已经执行完成。比如10个token,循环发送,怎么知道什么时候真正发送完成?

from dbay-apns-for-java.

RamosLi avatar RamosLi commented on July 28, 2024

苹果的APNS接口是这么设计的:你发条通知过去,成功与否不知道,得等着,等多少时间呢,1分钟,2分钟,1个小时。。。也不知道。 HTTP协议有request和response,苹果的接口相当于只有request而没有response。所以不确定是否发送成功。
因此这个类库设计时就采用了异步。如果你想知道咱们的消息是否通过网络发出去了,抱歉,现在没有提供回调接口,不过你可以改改源代码来满足你的需求

from dbay-apns-for-java.

luffyliups avatar luffyliups commented on July 28, 2024

这个我知道。其实我只是想知道所有“发送”动作是不是都做完,因为这里用到线程池发送,在重发机制里面又用到 Thread.start(),所以顶层的调用主线程没办法知道是不是所有的子线程已经执行完。我要的就是这个效果而已。
多谢多谢。

from dbay-apns-for-java.

qysnowqy avatar qysnowqy commented on July 28, 2024

作者,您好。一次推送完成,是否有成功多少?失败多少的api呢

from dbay-apns-for-java.

RamosLi avatar RamosLi commented on July 28, 2024

不会,因为失败的再次发送也会失败,所以会丢弃

from dbay-apns-for-java.

qysnowqy avatar qysnowqy commented on July 28, 2024

我的意思是,是否有成功多少、失败多少的统计结果

from dbay-apns-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.