[0.7.3] setFlushThresholds(0, 0) make sending notification delayed
See original GitHub issueTest code:
public class PushyTest {
public static void main(String[] args) throws Exception {
ApnsClient<SimpleApnsPushNotification> apnsClient;
apnsClient = new ApnsClient<>(...);
apnsClient.setFlushThresholds(0, 0);
apnsClient.connect(ApnsClient.DEVELOPMENT_APNS_HOST).await();
System.out.println("connected");
// Wait event loop to start polling
Thread.sleep(1000);
SimpleApnsPushNotification notification = new SimpleApnsPushNotification(...);
System.out.println("send begin");
apnsClient.sendNotification(notification).await();
System.out.println("send complete");
apnsClient.disconnect().await();
}
}
It takes very long time between send begin
and send complete
. If changed to setFlushThresholds(1, 1)
, it is sent immediately.
Stack dump right after send begin
shows NioEventLoop blocked at select()
call.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Top 10 Ways to Fix Delayed Notifications on Android
Android apps not sending notifications right away? Apply these troubleshooting tips to fix delayed notifications issues on Android.
Read more >Notifications Delayed - OneSignal Documentation
Possible reasons notifications can be delayed or not shown quickly. Normally push notifications arrive quite quickly. The most common reason for notifications ......
Read more >Fix- Notification Delay on iPhone! - YouTube
Are you getting delayed notifications from social media apps like ... 0 :00 What this video is about 0 :28 Things to make...
Read more >Delayed Notifications Issue on iPhone and iPad after iOS 14.4
How to fix notifications delay on all apps on iPhone, Why am I receiving notifications delay after iOS 14, Whatsapp delayed Notifications on ......
Read more >Delaying an Email Notification from being sent - ServiceNow
Solved: Hello SN Comm, I am looking to see what is the best way to Delay an Email notification that is triggered from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep—that sounds problematic 😉
I’m curious why you’re having this issue here, but we don’t see the same thing in
ApnsClientTest#testSendNotificationWithImmediateFlush()
. Will investigate, though as @ewmkkpe points out, the flush thresholds will be going away shortly (see #326).After some thought, I’ve decided to roll back fancy flushing entirely. This should no longer be an issue now that #350 is merged. We’ll look forward to upstream support for this feature in the near future.