Simple way to pipe one observable into another?
See original GitHub issueHey folks,
I went through the documentation but couldn’t find it, but my gut feeling says it’s there. Also the ConnectableObservable does not that what I want (I think?).
In my code I have something like this:
configProvider.closeBuckets().subscribe(new Observer<ClusterConfig>() {
@Override
public void onCompleted() {
request.observable().onCompleted();
}
@Override
public void onError(Throwable e) {
request.observable().onError(e);
}
@Override
public void onNext(ClusterConfig clusterConfig) {
request.observable().onNext(clusterConfig);
}
});
You can see that more or less I want to pipe all the stuff into a different observable. Something like.
configProvider.closeBuckets().subscribe(request.observable());
So I’d like to subscribe with another observable, if that makes sense?
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Rxjs One Observable Feeding into Another - Stack Overflow
For transforming items emitted by an Observable into another Observable, you probably want to use the flatMap operator.
Read more >Passing value from one observable to another in RxJS
Passing value from one observable to another in RxJS ... The simplest solution that comes to mind for the situation is through nested...
Read more >3 Common Mistakes I see people use in Rx and the ... - Medium
1. Taking Data out of Observables to put into other Observables. · 2. Using multiple Observable.subscribes in an expression. · 3. Not returning...
Read more >Get started transforming streams with map, pluck, and mapTo
In this article, we are going to learn about the most common operator used to transform streams, the map operator. We will start...
Read more >The cleanest way to write observable chains - Level Up Coding
Solution 4: break up the observable chain ... There is one alternate strategy we can use for readability. That is to break up...
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 Free
Top 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
Looks you are describing Subject?
Essentially, I am doing this (my code uses generics properly, I omitted them for brevity):