Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Around 50,000 pushes, 50% pushes are not delivered... #192

Open
GoogleCodeExporter opened this issue Apr 23, 2015 · 3 comments
Open

Around 50,000 pushes, 50% pushes are not delivered... #192

GoogleCodeExporter opened this issue Apr 23, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Try to send 50,000 pushes

What is the expected output? What do you see instead?
Expecting atleast 90% successful pushes

What version of the product are you using? On what operating system?
Latest version

Please provide any additional information below.
I am using around 30 threads to send more than 30-50 thousand pushes. Most of 
the pushes(50%) are not delivered...
pushedNotifications.getSuccessfulNotifications() returns around 20,000
pushedNotifications.getFailedNotifications() returns just around 100.
what happens to the rest???????????
There is no error in logs also....

Original issue reported on code.google.com by coder.a...@gmail.com on 10 Jul 2013 at 1:16

@GoogleCodeExporter
Copy link
Author

Ubuntu operating system

Original comment by coder.a...@gmail.com on 10 Jul 2013 at 1:19

@GoogleCodeExporter
Copy link
Author

This is the code I am using to send more than 50,000 notifications

@Override
public List<PushedNotifications> pushAlert(String environment, InputStream is,
            String password, Map<Integer, PushDevice> mapPushDevices, int numberOfThreads) throws JSONException, KeystoreException, CommunicationException, Exception {
        List<PushedNotifications> pushedNotifications = new ArrayList<PushedNotifications>();
        try {
            for (PushDevice pushDevice : mapPushDevices.values()) {
                PushMessage pushMessage = pushDevice.getPushMessage();
                Payload payload = new PushNotificationPayload(pushMessage.getMessage(), pushMessage.getBadge(), "default");
                Map<String, Object> fields = pushMessage.getFields();
                if (fields != null) {
                    for (Map.Entry<String, Object> entry : fields.entrySet()) {
                        payload.addCustomDictionary(entry.getKey(), String.valueOf(entry.getValue()));
                    }
                }
                PushedNotifications pushedNotification = null;

                if ("Sandbox".equals(environment)) {
                    pushedNotification = Push.payload(payload, is, password, Boolean.FALSE, numberOfThreads, pushDevice.getDevicePushTokens());
                } else {
                    pushedNotification = Push.payload(payload, is, password, Boolean.TRUE, numberOfThreads, pushDevice.getDevicePushTokens());
                }

                pushedNotifications.add(pushedNotification);
            }
        } catch (KeystoreException ex) {
            throw ex;
        } catch (CommunicationException ex) {
            throw ex;
        } catch (Exception ex) {
            throw ex;
        }
        return pushedNotifications;
    }

Original comment by coder.a...@gmail.com on 10 Jul 2013 at 1:33

@GoogleCodeExporter
Copy link
Author

Please try latest build in the trunk.  Also, did you use the Feedback service 
to find out if Apple has issues with all your failed notifications?

Original comment by sype...@gmail.com on 11 Oct 2014 at 9:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant