{"action":"opened","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6219","repository_url":"https://api.github.com/repos/ReactiveX/RxJava","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6219/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6219/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6219/events","html_url":"https://github.com/ReactiveX/RxJava/issues/6219","id":362455571,"node_id":"MDU6SXNzdWUzNjI0NTU1NzE=","number":6219,"title":"onNext of the Subscribe method not completing after using the ZIP WITH operator in RxJava?","user":{"login":"robindanielk","id":25497676,"node_id":"MDQ6VXNlcjI1NDk3Njc2","avatar_url":"https://avatars3.githubusercontent.com/u/25497676?v=4","gravatar_id":"","url":"https://api.github.com/users/robindanielk","html_url":"https://github.com/robindanielk","followers_url":"https://api.github.com/users/robindanielk/followers","following_url":"https://api.github.com/users/robindanielk/following{/other_user}","gists_url":"https://api.github.com/users/robindanielk/gists{/gist_id}","starred_url":"https://api.github.com/users/robindanielk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robindanielk/subscriptions","organizations_url":"https://api.github.com/users/robindanielk/orgs","repos_url":"https://api.github.com/users/robindanielk/repos","events_url":"https://api.github.com/users/robindanielk/events{/privacy}","received_events_url":"https://api.github.com/users/robindanielk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-21T04:55:39Z","updated_at":"2018-09-21T04:55:39Z","closed_at":null,"author_association":"NONE","body":"Main POJO:\r\n```\r\nclass VideoResponse{\r\n    \tList<VideoFiles> videosFiles;\r\n    }\r\n```\r\nI have the following case where i combine the results from two database operation and return as  **Observable(List(VideoResponse))** .\r\n```\r\n    mDbHelper\r\n      ===/* getVideoCategory() returns Observable<List<VideoResponse>> */=========                 \r\n        .getVideoCategory()  \r\n        .flatMapIterable(videoResponses -> videoResponses)\r\n        .doOnNext(videoResponse -> {\r\n                  Timber.d(\"Flatmap Iterable Thread == > %s\", Thread.currentThread().getName());})\r\n        .concatMap((Function<VideoResponse, ObservableSource<VideoResponse>>) videoResponse -> {\r\n                    Integer videoId = videoResponse.getId();\r\n                    return Observable.fromCallable(() -> videoResponse)\r\n                                   .doOnNext(videoResponse1 -> {\r\n                                        \r\n                                Timber.d(\"Thread before ZIP WITH ===>  \r\n                                      %s\", Thread.currentThread().getName());\r\n                                    })\r\n    \r\n         ===/* getVideoFileList(int videoId) returns Observable<List<VideoFiles>> */====\r\n                                  \r\n                                  .zipWith(getVideoFilesList(videoId)),\r\n                                            (videoResponse1, videoFiles) -> {\r\n                                                videoResponse1.setFiles(videoFiles);\r\n                                                return videoResponse1;\r\n                                            })\r\n                                  .doOnNext(vResponse -> {\r\n                                        \r\n                                     Timber.d(\"Thread After ZIP WITH ===>  \r\n                                      %s\",Thread.currentThread().getName());\r\n                                    })\r\n               ======= /*This Gets printed*/ ======================\r\n                               .doOnComplete(()->{\r\n                                    Timber.d(\" OnComplete Thread for Video Files ===>  %s \",Thread.currentThread().getName());\r\n                                });\r\n       \r\n                         })\r\n                        .toList()\r\n                        .toObservable()\r\n              \r\n         ===/* Below Print statement is not getting Executed */=================              \r\n                         .doOnComplete(()->{\r\n                        Timber.d(\" Thread doOnComplete\");\r\n                    })\r\n                        .doOnNext(videoResponses -> {\r\n                            Timber.d(\"Thread after loading from the LOCAL DB ====> %s\", Thread.currentThread().getName());\r\n                }); \r\n```\r\n\r\nBelow are the scheduler threads being executed:\r\n```\r\n Flatmap Iterable Thread == >  RxCachedThreadScheduler-1\r\n     Thread before ZIP WITH  ===>  RxCachedThreadScheduler-1\r\n     Flatmap Iterable Thread == >  RxCachedThreadScheduler-1\r\n     Thread After ZIP WITH   ===>  RxCachedThreadScheduler-2\r\n     Thread before ZIP WITH  ===>  RxCachedThreadScheduler-2\r\n     Thread After ZIP WITH   ===>  RxCachedThreadScheduler-2\r\n```\r\n\r\nwhile debugging the flow is like => doOnNext(after flatMapIterable) => doOnSubscribe => directly goes to \"toList => toObservable and after that statements inside concatMap gets printed with the required values!!  after execution inside **ConcatMap**..the flow stops..Any help?"}}
{"actor":{"display_login":"robindanielk"}}