{"action":"opened","issue":{"url":"https://api.github.com/repos/relayrides/pushy/issues/194","labels_url":"https://api.github.com/repos/relayrides/pushy/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/relayrides/pushy/issues/194/comments","events_url":"https://api.github.com/repos/relayrides/pushy/issues/194/events","html_url":"https://github.com/relayrides/pushy/issues/194","id":107477952,"number":194,"title":"I wonder if there is problem","user":{"login":"jjhangu","id":5935815,"avatar_url":"https://avatars.githubusercontent.com/u/5935815?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhangu","html_url":"https://github.com/jjhangu","followers_url":"https://api.github.com/users/jjhangu/followers","following_url":"https://api.github.com/users/jjhangu/following{/other_user}","gists_url":"https://api.github.com/users/jjhangu/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhangu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhangu/subscriptions","organizations_url":"https://api.github.com/users/jjhangu/orgs","repos_url":"https://api.github.com/users/jjhangu/repos","events_url":"https://api.github.com/users/jjhangu/events{/privacy}","received_events_url":"https://api.github.com/users/jjhangu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-21T09:47:38Z","updated_at":"2015-09-21T09:47:38Z","closed_at":null,"body":"I'm working in service company, and want to change javapns to this pushy.\r\nbecause I test many data and this is really fast.\r\n\r\nwhat i concern about is when pushing 100 data, It is okay, I can see no error logs,\r\nbut more than one thousand, I can easily see error logs.\r\n\r\n**registerRejectedNotificationListener : INVALID_TOKEN**\r\n\r\nafter logs are below\r\n\r\nI knew that error notification added reque and will retry.\r\nbut I'm curious why Invalid_token error made\r\n\r\nis there no problem? can you explain?? thank you~!\r\n\r\n\r\n'''java\r\npublic class Starter {\r\n\tpublic static int count =0;\r\n\t\r\n\tpublic static void main(String args[]) throws InterruptedException{\r\n\t\t\r\n\t\tThread.sleep(10000);\r\n\t\tSystem.out.println(System.currentTimeMillis());\r\n\t\t\r\n\t\ttry{\r\n\t\t\tfinal PushManager<SimpleApnsPushNotification> pushManager =\r\n\t\t\t\t    new PushManager<SimpleApnsPushNotification>(\r\n\t\t\t\t        ApnsEnvironment.getSandboxEnvironment(),\r\n//\t\t\t\t        ApnsEnvironment.getProductionEnvironment(),\r\n\t\t\t\t        SSLContextUtil.createDefaultSSLContext(\"/neo_data/mobile/cert/****.p12\", \"****\"),\r\n\t\t\t\t        null, // Optional: custom event loop group\r\n\t\t\t\t        null, // Optional: custom ExecutorService for calling listeners\r\n\t\t\t\t        null, // Optional: custom BlockingQueue implementation\r\n\t\t\t\t        new PushManagerConfiguration(),\r\n\t\t\t\t        \"ExamplePushManager\");\r\n\t\t\t\tpushManager.start();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tpushManager.registerExpiredTokenListener(new ExpiredTokenListener<ApnsPushNotification>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void handleExpiredTokens(\r\n\t\t\t\t\t\t\tPushManager<? extends ApnsPushNotification> pushManager,\r\n\t\t\t\t\t\t\tCollection<ExpiredToken> expiredTokens) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tSystem.out.println(\"handleExpiredTokens : \" + expiredTokens);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tpushManager.registerFailedConnectionListener(new FailedConnectionListener<ApnsPushNotification>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void handleFailedConnection(\r\n\t\t\t\t\t\t\tPushManager<? extends ApnsPushNotification> pushManager,\r\n\t\t\t\t\t\t\tThrowable cause) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tSystem.err.println(\"handleFailedConnection : \" + cause.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tpushManager.registerRejectedNotificationListener(new RejectedNotificationListener<ApnsPushNotification>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void handleRejectedNotification(\r\n\t\t\t\t\t\t\tPushManager<? extends ApnsPushNotification> pushManager,\r\n\t\t\t\t\t\t\tApnsPushNotification notification,\r\n\t\t\t\t\t\t\tRejectedNotificationReason rejectionReason) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tSystem.err.println(\"registerRejectedNotificationListener : \" + rejectionReason.toString());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < 2000; i++) {\r\n\t\t\t\t\tstart(pushManager, i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n//\t            final byte[] token = TokenUtil.tokenStringToByteArray(\"<c0d9cf0b1a17268997af4778fb511b6944890795b86f37878552d0896df7a304>\");\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic static void start(PushManager<SimpleApnsPushNotification> pushManager, int index) throws InterruptedException, MalformedTokenStringException{\r\n\t\tfinal byte[] token = TokenUtil.tokenStringToByteArray(\"aca18e4722931949957067d2c3f8c931e9ce01476bf183a8289f001459cc0388\");\r\n\r\n        final ApnsPayloadBuilder payloadBuilder = new ApnsPayloadBuilder();\r\n\r\n        payloadBuilder.setAlertBody(index + \": test.\");\r\n//        payloadBuilder.setSoundFileName(\"default\");\r\n        \r\n        final String payload = payloadBuilder.buildWithDefaultMaximumLength();\r\n        pushManager.getQueue().put(new SimpleApnsPushNotification(token, payload));\r\n\t}\r\n}\r\n'''\r\n\r\n\r\n\r\n**registerRejectedNotificationListener : INVALID_TOKEN**\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification java.nio.channels.ClosedChannelException\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\nExamplePushManager-connection-1 failed to write notification javax.net.ssl.SSLException: SSLEngine closed already\r\n\r\n\r\n\r\n\r\n"}}