hengsokchamroeun / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

sendNotification to multiple devices reports success although notifications not delivered. #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Find 5 IPhones or IPads
2. Register them all for push alerts
3. use sendNotification

What is the expected output? What do you see instead?
I expect a push alert on all devices, although I see a push alert on some but 
not all.

What version of the product are you using? On what operating system?
1.6.1 under glassfish on Windows Server.
and
1.6.9
Please provide any additional information below.

Placing a Thread.Wait(100) between each sendNotification results in the 
messages being sent to every device.

Javapns reports that it has sent all messages, although the APNS service will 
never deliver them. 

Original issue reported on code.google.com by Paul.Es...@gmail.com on 4 Aug 2011 at 9:50

GoogleCodeExporter commented 8 years ago
Hello,

I could send a code example?

Original comment by alyr...@gmail.com on 11 Aug 2011 at 6:52

GoogleCodeExporter commented 8 years ago
does the example work?

Are you trying to add all the devices to the same payload? (This won't work.)

Original comment by idbill.p...@gmail.com on 30 Aug 2011 at 7:56

GoogleCodeExporter commented 8 years ago
Paul, did you find a solution to the issue you reported?  If not, have you 
tried javapns 2.0 and what is the result?  Thank you!

Original comment by sype...@gmail.com on 7 Sep 2011 at 4:32

GoogleCodeExporter commented 8 years ago
Additional note:  2.0 Beta 3 introduced specialized notification transmission 
classes (see new javapns.notification.transmission package) for sending 
payloads to large numbers of devices.  Based on your comment that introducing a 
Thread.wait(100) helped improve results consistency with Apple servers, I have 
added a "setSleepBetweenNotifications" method in the new NotificationThread 
class for introducing delays between notifications.  If you try javapns 2.0, 
please let me know if this helped.  Thanks!

Original comment by sype...@gmail.com on 10 Sep 2011 at 12:02

GoogleCodeExporter commented 8 years ago
Update: the specialized mass notification transmission classes have been 
revised and improved in 2.0 Beta 4.  The NotificationTest class has also been 
enhanced to provide a test case for multithreaded mass notification.  

In-house tests showed that:

1) The built-in connection auto-restart feature of NotificationThreads reduces 
the push error rate to almost zero.  Allowing threads to push thousands of 
notifications error-free.  The auto-restart feature is preset at 200 maximum 
notifications per connection, but can be customized easily.

2) The multi-attempt retry feature of PushNotificationManager further reduces 
the push error rate.  The retry feature is preset at 3 attempts per 
notification, but can be customized easily.

Combined with the auto-restart feature, the error rate for a test series of 
10,000 notifications over 20 threads went down to zero (with rare 2nd-attempt 
retries and no 3rd attempt).

Given that the test case successfully pushes thousands of notifications using 
multiple coordinated threads, I'm closing this issue as Fixed in 2.0 Beta 4.  
Please feel free to re-open if the issue is still not resolved for you.

Original comment by sype...@gmail.com on 15 Sep 2011 at 5:08

GoogleCodeExporter commented 8 years ago

javapns 2.0 is same problems.

Did you find a solution to the issue?

PLESE provide any information.

Original comment by sunbi...@gmail.com on 7 Nov 2011 at 1:10

GoogleCodeExporter commented 8 years ago
What is the problem exactly?  Please be more specific, and provide code and 
console output to help understand what the problem is.

Original comment by sype...@gmail.com on 7 Nov 2011 at 1:31