0
在通过JavaPNS发送推送通知时,发生下面的消息时发生异常。在通过JavaPNS发送通知时发生异常
Exception in thread "JavaPNS grouped notification thread in LIST mode" java.lang.OutOfMemoryError: Java heap space
我想是因为我试图发送通知给太多的用户1次。
public void send (List<Device> devices, Object keystore, String password, boolean production) {
/* Prepare a simple payload to push */
PushNotificationPayload payload = PushNotificationPayload.alert("Hello World!");
/* Decide how many threads you want to create and use */
int threads = 30;
/* Start threads, wait for them, and get a list of all pushed notifications */
List<PushedNotification> notifications = Push.payload(payload, keystore, password, production, threads, devices);
}
我把73889个设备令牌列表devices
和接收到异常。
您是否认为我需要多次发送通知? 有没有人有关于向很多人发送notificaion的想法?
谢谢!