question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exchange heartbeat subscriptions (streaming)

See original GitHub issue

Having an issue with CoinbasePro where disconnects on the web socket were getting triggered every so often after some period of inactivity (this due to the fact that on my user channel I don’t produce too many trades so messages can be sparse).

I solved this by effectively copying out CoinbaseProStreamingService.java amongst other classes to subscribe to CoinbasePro’s heartbeat channel which receives heartbeats once a second and prevents web socket from dying.

I am now seeing a similar issue with Bitstamp (albeit not as frequently) on their regular trades channel with some symbols. Bitstamp does not have a heartbeat channel but suggests using web sockets ping pong mechanism. Sending a way to send a non text based web socket frame is not exposed in the NettyStreamingService.java class.

In short, I would like to make two changes (or more) to the library:

1). Allow users the ability to subscribe to heartbeat channel as an exchange spec config for CoinbasePro (or have it by default subscribe by don’t pass heartbeat messages back to user of class-- Kraken does this).

2). Either expose method in NettyStreamingService.java to write non text based messages or just a ping method so that users can trigger web socket ping with some interval.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
earcecommented, May 22, 2020

There are only two exchanges that override it Lgo + Gemini, but the override does the same thing as the feature we just added.

0reactions
badgerwithaguncommented, May 22, 2020

Only thing is that now client exchanges need to call super to avoid losing the ping/pong behaviour. Have you checked that there aren’t any doing so?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exchange Server DAG heartbeat modification safe and what's ...
Hi Experts, I just want to confirm, Is it safe to modify Exchange Server DAG heartbeat and what is the best practice for...
Read more >
HEARTBEAT | Exchange Programs
Find U.S. Department of State programs for U.S. and non-U.S. citizens wishing to participate in cultural, educational, or professional exchanges.
Read more >
Channels - Coinbase Cloud
To receive heartbeat messages for specific products every second, subscribe to the heartbeat channel. Heartbeats include sequence numbers and last trade IDs ...
Read more >
Heartbeat - Build an active online community - AppSumo
Heartbeat is a communication and sharing platform that lets you host chats, live events, content, and courses under your own domain.
Read more >
Subscription - FHIR v5.0.0-cibuild
Subscriptions are active resources; a server can only accept a subscription if it will execute the specified channel for any resources subsequently received....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found