-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[improve][websocket] Add ping support #19203
Conversation
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/AbstractWebSocketHandler.java
Outdated
Show resolved
Hide resolved
...websocket/src/main/java/org/apache/pulsar/websocket/service/WebSocketProxyConfiguration.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/websocket/proxy/ProxyPingTest.java
Show resolved
Hide resolved
Ping @poorbarcode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #19203 +/- ##
============================================
- Coverage 43.01% 42.56% -0.46%
- Complexity 10167 10304 +137
============================================
Files 747 773 +26
Lines 72255 74509 +2254
Branches 7786 8031 +245
============================================
+ Hits 31080 31714 +634
- Misses 37577 39077 +1500
- Partials 3598 3718 +120
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
/pulsarbot rerun-failure-checks |
Remove |
Motivation
When the WebSocket connection is idle timeout, the server disconnects the client. We need to keep alive between the client and the server.
There are two options:
Some client(browser) doesn't support sending the ping frame to the server, which causes idle timeout, so we only add enable ping feature on the server.
Note: The Jetty automatically processes ping/pong frames from the client by default.
Modifications
webSocketPingDurationSeconds
config to enable the ping featureDocumentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: