Comments (2)
I'm sure you've been busy, just sending again for visbility.
@jchambers
from pushy.
It sounds like everything here is working as intended. To address your questions directly:
It seems that after encountering the IOException…, the other requests should be sent by other connections rather than nioEventLoopGroup-25-1. But Pushy still used nioEventLoopGroup-25-1(Http2Exception$StreamException, ClosedChannelException).
An exception on a channel is generally not fatal. All kinds of exceptions can occur that apply only to a single stream (and thus only a single notification), and closing a connection after every exception would lead to expensive and unnecessary cycling of channels. This is, as near as I can tell, working as intended.
There is another strange phenomenon where nioEventLoopGroup-25-1 handleConnectionRemoved, and then nioEventLoopGroup-25-3 starts receiving responses.
That seems normal to me, but perhaps I don't understand the concern. If I understand the implication correctly, I think you're saying that for a single channel, it appears that the channel is removed from the pool before it begins processing responses. If that's the case, that can certainly happen because the channel pool is using one event loop while the channel itself is using another to process traffic to and from the APNs server. Since they're on different threads, there's no guarantee as to the order in which events from thread A and thread B will be interleaved.
All "handleConnectionRemoved"s were found in nioEventLoopGroup-xx-1. Is it designed in this way?
Yes. Channel pools use a single event loop to make sure pool-related events are processed in order.
Additionally, I have configured 4 connections, but the other 2 threads are rarely being used. Is this normal?
Without knowing specifically how threads are getting mapped to connections in your specific scenario, I don't know, but I don't think that's necessarily unexpected. I don't think Netty guarantees that channels will be evenly distributed across threads in an event loop group, so it may be that multiple channels are getting assigned to the same thread.
In all, none of this sounds alarming or like anything is behaving incorrectly. I don't think there's any action to be taken, and so I'll close this issue for now.
from pushy.
Related Issues (20)
- return success when send notifacation after uninstalling app HOT 1
- I use Pushy to push the message,then I get "success=true",but the phone not responding HOT 2
- couple of Live Activity issues: stale-date is missing, and relevance-score can now have a value greater than 1.0 HOT 2
- Native SSL provider is available; will use native provider. HOT 4
- ApnsChannelPool java.io.IOException "Failed to create channel - Connection reset by peer" HOT 2
- Network is unreachable: `api.push.apple.com/2620:149:208:4308:0:0:0:a:443` HOT 13
- Missing "start" enumeration com.eatthepath.pushy.apns.util.LiveActivityEvent HOT 2
- add attributes-type and attributes to the payloadbuilder HOT 2
- Not able to use LiveActivityEvent class in the depenedcy HOT 2
- The issue of not being able to recognize PushType and DeliveryPriority from version 0.15.3 and onwards. HOT 1
- 如果连接时抛出 SslHandshakeTimeoutException 异常,那么 ApnsChannelPool pendingCreateChannelFutures 会一直被占有 HOT 7
- Wrong serialization of the object in JsonSerializer HOT 3
- Memory Leak HOT 1
- io.netty.handler.codec.http2.Http2Exception$StreamException: Stream closed before write could take place HOT 1
- Allow methods to not require passing a privateKeyPassword HOT 1
- 0.15.4 with jdk 8 error HOT 2
- UnknownHostException (Not caused by IPv6) jdk17 pushy 0.15.4 Dig can be resolved to. HOT 4
- How to implement VoIP Notification using Pushy HOT 4
- Request spending a long time when the certificate expires HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pushy.