For APNs the following code fire up a APNs connection per 1000 tokens: https://github.com/lfryc/aerogear-unifiedpush-server/blob/jms-batching/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/Sender.java#L40-L41
This is a problem. We should not do that.
Improvements:
-
before firing the above selection, open the APNs connection, and reuse per 1000 tokens
-
on the last selection, we should close the APNs connection.
So in between we reuse the connection.
For APNs. I think we should also increase the size of allowed tokens to 10k.
|