Not possible to get callback on stream completion
See original GitHub issueIn the event of an error that causes the stream to close, it does not seem to be a way to be notified about this, e.g. to shut the application down. The actual Future of the stream is “hidden” inside the Future[TwitterStream]
that the streaming client exposes, so the only completion one is notified about is if the initial connect succeeds or fails. Neither does it seem to be any control messages to listen to in this case.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Stream.pipeline() does not call the callback on completion
I use the following code to test the callback of the pipeline() function under node 12.18.0 and node 14.4.0: 'use strict'; import {pipeline, ......
Read more >nodejs stream finish callback after pipe is not launched
You need to catch the event finish on the pipe object, not on the pdf object: console.log("saving file"); pdf .pipe( fs.createWriteStream(".
Read more >Node.js stream.finished() Method
It can be writable i.e. When set to false, then a callback function is called when the stream ends still the stream can...
Read more >Stream | Node.js v19.3.0 Documentation
The callback is invoked before 'finish' or on error. ... The callback is invoked if 'finish' or 'error' is emitted. ... This method...
Read more >AsyncThrowingStream | Apple Developer Documentation
To adapt existing callback code to use async - await , use the callbacks to provide values to the stream, by using the...
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
What I would like to do is something like:
But this does not work, since the future that is returned is the connection future, and not the stream future.
Maybe. The reason I added this in addition to https://github.com/DanielaSfregola/twitter4s/issues/142 was that I had a very low volume stream, and akka streams reached an idle timeout. Not sure how these low level “protocol” exceptions would propagate to the client.