Skip to content

CID-3792: Implement heartbeat support#106

Merged
mohamedlajmileanix merged 5 commits intomainfrom
feature/CID-3792/Implement-heartbeat-support-for-the-websocket-client-and-server
May 6, 2025
Merged

CID-3792: Implement heartbeat support#106
mohamedlajmileanix merged 5 commits intomainfrom
feature/CID-3792/Implement-heartbeat-support-for-the-websocket-client-and-server

Conversation

@mohamedlajmileanix
Copy link
Contributor

@mohamedlajmileanix mohamedlajmileanix commented May 6, 2025

🛠 Changes made

Implement heartbeat support

✨ Type of change

Please delete the options that are not relevant.

  • New feature (non-breaking change which adds functionality)

🧪 How Has This Been Tested?

  • No tests needed

🏎 Checklist:

  • My code follows the style guidelines
  • I have performed a self-review of my own code
  • Any dependent changes have been merged and published in downstream modules
  • My commit message clearly reflects the changes made
  • Assigned the appropriate labels (version, PR type, etc.)

@mohamedlajmileanix mohamedlajmileanix added the enhancement New feature or request label May 6, 2025
@github-actions
Copy link

github-actions bot commented May 6, 2025

LeanIX GitHub Agent Code Coverage

File Coverage [95.65%] 🍏
WebSocketClientConfig.kt 95.65% 🍏
Total Project Coverage 67.88% 🍏

@mohamedlajmileanix mohamedlajmileanix marked this pull request as ready for review May 6, 2025 06:30
@mohamedlajmileanix mohamedlajmileanix requested a review from a team as a code owner May 6, 2025 06:30
@henriq-amaral-leanix
Copy link
Contributor

I'm not sure if we need to create a new endpoint for it.
On the server, we have the following method:

val accessor = MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor::class.java)
boolean isHeartbeat = accessor.isHeartbeat();

Maybe we could use it for the heartbeats.
Here are some examples using it, with interceptor and handler:
https://github.com/savra/StepicMiddleJavaDeveloperMtsBank/blob/2c03345dac24bd2ba0a13be1f0de6cf48b3b128e/src/main/java/com/hvdbs/savra/StepicMiddleJavaDeveloperMtsBank/websocket/controller/StompChannelOutboundInterceptor.java#L55

https://github.com/epam/TimebaseWS/blob/90b85b75c5f7cdc4bc2ab4cfaf1f7f4ef1509522/java/ws-server/src/main/java/com/epam/deltix/tbwg/webapp/interceptors/WebSocketLogInterceptor.java#L40

https://github.com/WeBankBlockchain/WeEvent/blob/0d75c5427814d400451a019ee74f161edaf03daa/weevent-broker/src/main/java/com/webank/weevent/broker/protocol/stomp/BrokerStomp.java#L92

@mohamedlajmileanix mohamedlajmileanix merged commit 38e5beb into main May 6, 2025
4 checks passed
@mohamedlajmileanix mohamedlajmileanix had a problem deploying to ghcr:leanix-github-agent May 6, 2025 10:48 — with GitHub Actions Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants