-
ReactiveX - SubjectAndroid/Rx 2019. 9. 4. 11:33반응형
https://github.com/DNights/rxSubjectSample
RxSubject 에 관한 내용을 정리하였습니다.
RxSubject는 아래 4가지 종류가 있습니다.
AysncSubject
BehaviorSubject
PublishSubject
ReplaySubject
AysncSubject는 구독이 끝나고 가장 마지막값을 전달합니다.
fun runOnNextWithAsyncSubject(){ for (i in 0..100){ asyncSubject.onNext("asyncSubject onNext $i") if(i % 10 == 0) asyncSubject.subscribe{ println("subscribe - $it") } } asyncSubject.onComplete() }
위와 같이 작성된 코드를 테스트 해보면 아래와 같은 형태로 출력됩니다.
...더보기asyncSubjectTest doOnSubscribe asyncSubject onNext 100 asyncSubjectTest doOnComplete subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 subscribe - asyncSubject onNext 100 Process finished with exit code 0
BehaviorSubject 는 최근발행값 또는 구독 시점이후에 발행 값들을 전달합니다.
fun runOnNextWithBehaviorSubject(){ for (i in 0..100){ behaviorSubject.onNext("behaviorSubject onNext $i") if(i % 10 == 0) behaviorSubject.subscribe{ println("subscribe - $it") } } behaviorSubject.onComplete() }
위와 같이 작성된 코드를 테스트 해보면 아래와 같은 형태로 출력됩니다.
...더보기behaviorSubjectTest doOnSubscribe behaviorSubject onNext 0 subscribe - behaviorSubject onNext 0 behaviorSubject onNext 1 subscribe - behaviorSubject onNext 1 behaviorSubject onNext 2 subscribe - behaviorSubject onNext 2 behaviorSubject onNext 3 subscribe - behaviorSubject onNext 3 behaviorSubject onNext 4 subscribe - behaviorSubject onNext 4 behaviorSubject onNext 5 subscribe - behaviorSubject onNext 5 behaviorSubject onNext 6 subscribe - behaviorSubject onNext 6 behaviorSubject onNext 7 subscribe - behaviorSubject onNext 7 behaviorSubject onNext 8 subscribe - behaviorSubject onNext 8 behaviorSubject onNext 9 subscribe - behaviorSubject onNext 9 behaviorSubject onNext 10 subscribe - behaviorSubject onNext 10 subscribe - behaviorSubject onNext 10 behaviorSubject onNext 11 subscribe - behaviorSubject onNext 11 subscribe - behaviorSubject onNext 11 behaviorSubject onNext 12 subscribe - behaviorSubject onNext 12 subscribe - behaviorSubject onNext 12 behaviorSubject onNext 13 subscribe - behaviorSubject onNext 13 subscribe - behaviorSubject onNext 13 behaviorSubject onNext 14 subscribe - behaviorSubject onNext 14 subscribe - behaviorSubject onNext 14 behaviorSubject onNext 15 subscribe - behaviorSubject onNext 15 subscribe - behaviorSubject onNext 15 behaviorSubject onNext 16 subscribe - behaviorSubject onNext 16 subscribe - behaviorSubject onNext 16 behaviorSubject onNext 17 subscribe - behaviorSubject onNext 17 subscribe - behaviorSubject onNext 17 behaviorSubject onNext 18 subscribe - behaviorSubject onNext 18 subscribe - behaviorSubject onNext 18 behaviorSubject onNext 19 subscribe - behaviorSubject onNext 19 subscribe - behaviorSubject onNext 19 behaviorSubject onNext 20 subscribe - behaviorSubject onNext 20 subscribe - behaviorSubject onNext 20 subscribe - behaviorSubject onNext 20 behaviorSubject onNext 21 subscribe - behaviorSubject onNext 21 subscribe - behaviorSubject onNext 21 subscribe - behaviorSubject onNext 21 behaviorSubject onNext 22 subscribe - behaviorSubject onNext 22 subscribe - behaviorSubject onNext 22 subscribe - behaviorSubject onNext 22 behaviorSubject onNext 23 subscribe - behaviorSubject onNext 23 subscribe - behaviorSubject onNext 23 subscribe - behaviorSubject onNext 23 behaviorSubject onNext 24 subscribe - behaviorSubject onNext 24 subscribe - behaviorSubject onNext 24 subscribe - behaviorSubject onNext 24 behaviorSubject onNext 25 subscribe - behaviorSubject onNext 25 subscribe - behaviorSubject onNext 25 subscribe - behaviorSubject onNext 25 behaviorSubject onNext 26 subscribe - behaviorSubject onNext 26 subscribe - behaviorSubject onNext 26 subscribe - behaviorSubject onNext 26 behaviorSubject onNext 27 subscribe - behaviorSubject onNext 27 subscribe - behaviorSubject onNext 27 subscribe - behaviorSubject onNext 27 behaviorSubject onNext 28 subscribe - behaviorSubject onNext 28 subscribe - behaviorSubject onNext 28 subscribe - behaviorSubject onNext 28 behaviorSubject onNext 29 subscribe - behaviorSubject onNext 29 subscribe - behaviorSubject onNext 29 subscribe - behaviorSubject onNext 29 behaviorSubject onNext 30 subscribe - behaviorSubject onNext 30 subscribe - behaviorSubject onNext 30 subscribe - behaviorSubject onNext 30 subscribe - behaviorSubject onNext 30 behaviorSubject onNext 31 subscribe - behaviorSubject onNext 31 subscribe - behaviorSubject onNext 31 subscribe - behaviorSubject onNext 31 subscribe - behaviorSubject onNext 31 behaviorSubject onNext 32 subscribe - behaviorSubject onNext 32 subscribe - behaviorSubject onNext 32 subscribe - behaviorSubject onNext 32 subscribe - behaviorSubject onNext 32 behaviorSubject onNext 33 subscribe - behaviorSubject onNext 33 subscribe - behaviorSubject onNext 33 subscribe - behaviorSubject onNext 33 subscribe - behaviorSubject onNext 33 behaviorSubject onNext 34 subscribe - behaviorSubject onNext 34 subscribe - behaviorSubject onNext 34 subscribe - behaviorSubject onNext 34 subscribe - behaviorSubject onNext 34 behaviorSubject onNext 35 subscribe - behaviorSubject onNext 35 subscribe - behaviorSubject onNext 35 subscribe - behaviorSubject onNext 35 subscribe - behaviorSubject onNext 35 behaviorSubject onNext 36 subscribe - behaviorSubject onNext 36 subscribe - behaviorSubject onNext 36 subscribe - behaviorSubject onNext 36 subscribe - behaviorSubject onNext 36 behaviorSubject onNext 37 subscribe - behaviorSubject onNext 37 subscribe - behaviorSubject onNext 37 subscribe - behaviorSubject onNext 37 subscribe - behaviorSubject onNext 37 behaviorSubject onNext 38 subscribe - behaviorSubject onNext 38 subscribe - behaviorSubject onNext 38 subscribe - behaviorSubject onNext 38 subscribe - behaviorSubject onNext 38 behaviorSubject onNext 39 subscribe - behaviorSubject onNext 39 subscribe - behaviorSubject onNext 39 subscribe - behaviorSubject onNext 39 subscribe - behaviorSubject onNext 39 behaviorSubject onNext 40 subscribe - behaviorSubject onNext 40 subscribe - behaviorSubject onNext 40 subscribe - behaviorSubject onNext 40 subscribe - behaviorSubject onNext 40 subscribe - behaviorSubject onNext 40 behaviorSubject onNext 41 subscribe - behaviorSubject onNext 41 subscribe - behaviorSubject onNext 41 subscribe - behaviorSubject onNext 41 subscribe - behaviorSubject onNext 41 subscribe - behaviorSubject onNext 41 behaviorSubject onNext 42 subscribe - behaviorSubject onNext 42 subscribe - behaviorSubject onNext 42 subscribe - behaviorSubject onNext 42 subscribe - behaviorSubject onNext 42 subscribe - behaviorSubject onNext 42 behaviorSubject onNext 43 subscribe - behaviorSubject onNext 43 subscribe - behaviorSubject onNext 43 subscribe - behaviorSubject onNext 43 subscribe - behaviorSubject onNext 43 subscribe - behaviorSubject onNext 43 behaviorSubject onNext 44 subscribe - behaviorSubject onNext 44 subscribe - behaviorSubject onNext 44 subscribe - behaviorSubject onNext 44 subscribe - behaviorSubject onNext 44 subscribe - behaviorSubject onNext 44 behaviorSubject onNext 45 subscribe - behaviorSubject onNext 45 subscribe - behaviorSubject onNext 45 subscribe - behaviorSubject onNext 45 subscribe - behaviorSubject onNext 45 subscribe - behaviorSubject onNext 45 behaviorSubject onNext 46 subscribe - behaviorSubject onNext 46 subscribe - behaviorSubject onNext 46 subscribe - behaviorSubject onNext 46 subscribe - behaviorSubject onNext 46 subscribe - behaviorSubject onNext 46 behaviorSubject onNext 47 subscribe - behaviorSubject onNext 47 subscribe - behaviorSubject onNext 47 subscribe - behaviorSubject onNext 47 subscribe - behaviorSubject onNext 47 subscribe - behaviorSubject onNext 47 behaviorSubject onNext 48 subscribe - behaviorSubject onNext 48 subscribe - behaviorSubject onNext 48 subscribe - behaviorSubject onNext 48 subscribe - behaviorSubject onNext 48 subscribe - behaviorSubject onNext 48 behaviorSubject onNext 49 subscribe - behaviorSubject onNext 49 subscribe - behaviorSubject onNext 49 subscribe - behaviorSubject onNext 49 subscribe - behaviorSubject onNext 49 subscribe - behaviorSubject onNext 49 behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 subscribe - behaviorSubject onNext 50 behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 subscribe - behaviorSubject onNext 51 behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 subscribe - behaviorSubject onNext 52 behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 subscribe - behaviorSubject onNext 53 behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 subscribe - behaviorSubject onNext 54 behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 subscribe - behaviorSubject onNext 55 behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 subscribe - behaviorSubject onNext 56 behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 subscribe - behaviorSubject onNext 57 behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 subscribe - behaviorSubject onNext 58 behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 subscribe - behaviorSubject onNext 59 behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 subscribe - behaviorSubject onNext 60 behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 subscribe - behaviorSubject onNext 61 behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 subscribe - behaviorSubject onNext 62 behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 subscribe - behaviorSubject onNext 63 behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 subscribe - behaviorSubject onNext 64 behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 subscribe - behaviorSubject onNext 65 behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 subscribe - behaviorSubject onNext 66 behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 subscribe - behaviorSubject onNext 67 behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 subscribe - behaviorSubject onNext 68 behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 subscribe - behaviorSubject onNext 69 behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 subscribe - behaviorSubject onNext 70 behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 subscribe - behaviorSubject onNext 71 behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 subscribe - behaviorSubject onNext 72 behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 subscribe - behaviorSubject onNext 73 behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 subscribe - behaviorSubject onNext 74 behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 subscribe - behaviorSubject onNext 75 behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 subscribe - behaviorSubject onNext 76 behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 subscribe - behaviorSubject onNext 77 behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 subscribe - behaviorSubject onNext 78 behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 subscribe - behaviorSubject onNext 79 behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 subscribe - behaviorSubject onNext 80 behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 subscribe - behaviorSubject onNext 81 behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 subscribe - behaviorSubject onNext 82 behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 subscribe - behaviorSubject onNext 83 behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 subscribe - behaviorSubject onNext 84 behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 subscribe - behaviorSubject onNext 85 behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 subscribe - behaviorSubject onNext 86 behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 subscribe - behaviorSubject onNext 87 behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 subscribe - behaviorSubject onNext 88 behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 subscribe - behaviorSubject onNext 89 behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 subscribe - behaviorSubject onNext 90 behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 subscribe - behaviorSubject onNext 91 behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 subscribe - behaviorSubject onNext 92 behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 subscribe - behaviorSubject onNext 93 behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 subscribe - behaviorSubject onNext 94 behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 subscribe - behaviorSubject onNext 95 behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 subscribe - behaviorSubject onNext 96 behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 subscribe - behaviorSubject onNext 97 behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 subscribe - behaviorSubject onNext 98 behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 subscribe - behaviorSubject onNext 99 behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 subscribe - behaviorSubject onNext 100 behaviorSubjectTest doOnComplete Process finished with exit code 0
PublishSubject는 구독시점부터 발행하는 순서로 바로 전달합니다.
fun runOnNextWithPublishSubject(){ for (i in 0..100){ publishSubject.onNext("publishSubject onNext $i") if(i % 10 == 0) publishSubject.subscribe{ println("subscribe - $it") } } publishSubject.onComplete() }
위와 같이 작성된 코드를 테스트 해보면 아래와 같은 형태로 출력됩니다.
...더보기publishSubjectTest doOnSubscribe subscribe - publishSubject onNext 1 subscribe - publishSubject onNext 2 subscribe - publishSubject onNext 3 subscribe - publishSubject onNext 4 subscribe - publishSubject onNext 5 subscribe - publishSubject onNext 6 subscribe - publishSubject onNext 7 subscribe - publishSubject onNext 8 subscribe - publishSubject onNext 9 subscribe - publishSubject onNext 10 subscribe - publishSubject onNext 11 subscribe - publishSubject onNext 11 subscribe - publishSubject onNext 12 subscribe - publishSubject onNext 12 subscribe - publishSubject onNext 13 subscribe - publishSubject onNext 13 subscribe - publishSubject onNext 14 subscribe - publishSubject onNext 14 subscribe - publishSubject onNext 15 subscribe - publishSubject onNext 15 subscribe - publishSubject onNext 16 subscribe - publishSubject onNext 16 subscribe - publishSubject onNext 17 subscribe - publishSubject onNext 17 subscribe - publishSubject onNext 18 subscribe - publishSubject onNext 18 subscribe - publishSubject onNext 19 subscribe - publishSubject onNext 19 subscribe - publishSubject onNext 20 subscribe - publishSubject onNext 20 subscribe - publishSubject onNext 21 subscribe - publishSubject onNext 21 subscribe - publishSubject onNext 21 subscribe - publishSubject onNext 22 subscribe - publishSubject onNext 22 subscribe - publishSubject onNext 22 subscribe - publishSubject onNext 23 subscribe - publishSubject onNext 23 subscribe - publishSubject onNext 23 subscribe - publishSubject onNext 24 subscribe - publishSubject onNext 24 subscribe - publishSubject onNext 24 subscribe - publishSubject onNext 25 subscribe - publishSubject onNext 25 subscribe - publishSubject onNext 25 subscribe - publishSubject onNext 26 subscribe - publishSubject onNext 26 subscribe - publishSubject onNext 26 subscribe - publishSubject onNext 27 subscribe - publishSubject onNext 27 subscribe - publishSubject onNext 27 subscribe - publishSubject onNext 28 subscribe - publishSubject onNext 28 subscribe - publishSubject onNext 28 subscribe - publishSubject onNext 29 subscribe - publishSubject onNext 29 subscribe - publishSubject onNext 29 subscribe - publishSubject onNext 30 subscribe - publishSubject onNext 30 subscribe - publishSubject onNext 30 subscribe - publishSubject onNext 31 subscribe - publishSubject onNext 31 subscribe - publishSubject onNext 31 subscribe - publishSubject onNext 31 subscribe - publishSubject onNext 32 subscribe - publishSubject onNext 32 subscribe - publishSubject onNext 32 subscribe - publishSubject onNext 32 subscribe - publishSubject onNext 33 subscribe - publishSubject onNext 33 subscribe - publishSubject onNext 33 subscribe - publishSubject onNext 33 subscribe - publishSubject onNext 34 subscribe - publishSubject onNext 34 subscribe - publishSubject onNext 34 subscribe - publishSubject onNext 34 subscribe - publishSubject onNext 35 subscribe - publishSubject onNext 35 subscribe - publishSubject onNext 35 subscribe - publishSubject onNext 35 subscribe - publishSubject onNext 36 subscribe - publishSubject onNext 36 subscribe - publishSubject onNext 36 subscribe - publishSubject onNext 36 subscribe - publishSubject onNext 37 subscribe - publishSubject onNext 37 subscribe - publishSubject onNext 37 subscribe - publishSubject onNext 37 subscribe - publishSubject onNext 38 subscribe - publishSubject onNext 38 subscribe - publishSubject onNext 38 subscribe - publishSubject onNext 38 subscribe - publishSubject onNext 39 subscribe - publishSubject onNext 39 subscribe - publishSubject onNext 39 subscribe - publishSubject onNext 39 subscribe - publishSubject onNext 40 subscribe - publishSubject onNext 40 subscribe - publishSubject onNext 40 subscribe - publishSubject onNext 40 subscribe - publishSubject onNext 41 subscribe - publishSubject onNext 41 subscribe - publishSubject onNext 41 subscribe - publishSubject onNext 41 subscribe - publishSubject onNext 41 subscribe - publishSubject onNext 42 subscribe - publishSubject onNext 42 subscribe - publishSubject onNext 42 subscribe - publishSubject onNext 42 subscribe - publishSubject onNext 42 subscribe - publishSubject onNext 43 subscribe - publishSubject onNext 43 subscribe - publishSubject onNext 43 subscribe - publishSubject onNext 43 subscribe - publishSubject onNext 43 subscribe - publishSubject onNext 44 subscribe - publishSubject onNext 44 subscribe - publishSubject onNext 44 subscribe - publishSubject onNext 44 subscribe - publishSubject onNext 44 subscribe - publishSubject onNext 45 subscribe - publishSubject onNext 45 subscribe - publishSubject onNext 45 subscribe - publishSubject onNext 45 subscribe - publishSubject onNext 45 subscribe - publishSubject onNext 46 subscribe - publishSubject onNext 46 subscribe - publishSubject onNext 46 subscribe - publishSubject onNext 46 subscribe - publishSubject onNext 46 subscribe - publishSubject onNext 47 subscribe - publishSubject onNext 47 subscribe - publishSubject onNext 47 subscribe - publishSubject onNext 47 subscribe - publishSubject onNext 47 subscribe - publishSubject onNext 48 subscribe - publishSubject onNext 48 subscribe - publishSubject onNext 48 subscribe - publishSubject onNext 48 subscribe - publishSubject onNext 48 subscribe - publishSubject onNext 49 subscribe - publishSubject onNext 49 subscribe - publishSubject onNext 49 subscribe - publishSubject onNext 49 subscribe - publishSubject onNext 49 subscribe - publishSubject onNext 50 subscribe - publishSubject onNext 50 subscribe - publishSubject onNext 50 subscribe - publishSubject onNext 50 subscribe - publishSubject onNext 50 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 51 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 52 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 53 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 54 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 55 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 56 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 57 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 58 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 59 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 60 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 61 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 62 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 63 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 64 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 65 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 66 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 67 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 68 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 69 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 70 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 71 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 72 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 73 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 74 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 75 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 76 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 77 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 78 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 79 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 80 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 81 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 82 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 83 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 84 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 85 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 86 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 87 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 88 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 89 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 90 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 91 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 92 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 93 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 94 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 95 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 96 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 97 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 98 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 99 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 subscribe - publishSubject onNext 100 publishSubject onNext 100 publishSubjectTest doOnComplete Process finished with exit code 0
ReplaySubject는 발행시 이전부터 발행되었던 모든 내역이 전달됩니다.
ReplaySubject 에서 주의할 점은 일정량의 버퍼를 넘어서거나 시간이 오래지나게 되면 이전 내역들이 삭제됩니다.
fun runOnNextWithReplaySubject(){ for (i in 0..100){ replaySubject.onNext("replaySubject onNext $i") if(i % 10 == 0) replaySubject.subscribe{ println("subscribe - $it") } } replaySubject.onComplete() }
위와 같이 작성된 코드를 테스트 해보면 아래와 같은 형태로 출력됩니다.
...더보기replaySubjectTest doOnSubscribe replaySubject onNext 0 subscribe - replaySubject onNext 0 replaySubject onNext 1 subscribe - replaySubject onNext 1 replaySubject onNext 2 subscribe - replaySubject onNext 2 replaySubject onNext 3 subscribe - replaySubject onNext 3 replaySubject onNext 4 subscribe - replaySubject onNext 4 replaySubject onNext 5 subscribe - replaySubject onNext 5 replaySubject onNext 6 subscribe - replaySubject onNext 6 replaySubject onNext 7 subscribe - replaySubject onNext 7 replaySubject onNext 8 subscribe - replaySubject onNext 8 replaySubject onNext 9 subscribe - replaySubject onNext 9 replaySubject onNext 10 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 replaySubject onNext 11 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 11 replaySubject onNext 12 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 12 replaySubject onNext 13 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 13 replaySubject onNext 14 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 14 replaySubject onNext 15 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 15 replaySubject onNext 16 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 16 replaySubject onNext 17 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 17 replaySubject onNext 18 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 18 replaySubject onNext 19 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 19 replaySubject onNext 20 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 replaySubject onNext 21 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 21 replaySubject onNext 22 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 22 replaySubject onNext 23 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 23 replaySubject onNext 24 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 24 replaySubject onNext 25 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 25 replaySubject onNext 26 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 26 replaySubject onNext 27 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 27 replaySubject onNext 28 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 28 replaySubject onNext 29 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 29 replaySubject onNext 30 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 replaySubject onNext 31 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 31 replaySubject onNext 32 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 32 replaySubject onNext 33 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 33 replaySubject onNext 34 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 34 replaySubject onNext 35 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 35 replaySubject onNext 36 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 36 replaySubject onNext 37 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 37 replaySubject onNext 38 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 38 replaySubject onNext 39 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 39 replaySubject onNext 40 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 replaySubject onNext 41 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 41 replaySubject onNext 42 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 42 replaySubject onNext 43 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 43 replaySubject onNext 44 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 44 replaySubject onNext 45 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 45 replaySubject onNext 46 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 46 replaySubject onNext 47 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 47 replaySubject onNext 48 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 48 replaySubject onNext 49 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 49 replaySubject onNext 50 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 replaySubject onNext 51 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 51 replaySubject onNext 52 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 52 replaySubject onNext 53 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 53 replaySubject onNext 54 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 54 replaySubject onNext 55 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 55 replaySubject onNext 56 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 56 replaySubject onNext 57 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 57 replaySubject onNext 58 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 58 replaySubject onNext 59 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 59 replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 60 replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 61 replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 62 replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 63 replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 64 replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 65 replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 66 replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 67 replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 68 replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 69 replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 70 replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 71 replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 72 replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 73 replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 74 replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 75 replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 76 replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 77 replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 78 replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 79 replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 80 replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 81 replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 82 replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 83 replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 84 replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 85 replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 86 replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 87 replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 88 replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 89 replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 90 replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 91 replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 92 replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 93 replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 94 replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 95 replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 96 replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 97 replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 98 replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 99 replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 100 subscribe - replaySubject onNext 0 subscribe - replaySubject onNext 1 subscribe - replaySubject onNext 2 subscribe - replaySubject onNext 3 subscribe - replaySubject onNext 4 subscribe - replaySubject onNext 5 subscribe - replaySubject onNext 6 subscribe - replaySubject onNext 7 subscribe - replaySubject onNext 8 subscribe - replaySubject onNext 9 subscribe - replaySubject onNext 10 subscribe - replaySubject onNext 11 subscribe - replaySubject onNext 12 subscribe - replaySubject onNext 13 subscribe - replaySubject onNext 14 subscribe - replaySubject onNext 15 subscribe - replaySubject onNext 16 subscribe - replaySubject onNext 17 subscribe - replaySubject onNext 18 subscribe - replaySubject onNext 19 subscribe - replaySubject onNext 20 subscribe - replaySubject onNext 21 subscribe - replaySubject onNext 22 subscribe - replaySubject onNext 23 subscribe - replaySubject onNext 24 subscribe - replaySubject onNext 25 subscribe - replaySubject onNext 26 subscribe - replaySubject onNext 27 subscribe - replaySubject onNext 28 subscribe - replaySubject onNext 29 subscribe - replaySubject onNext 30 subscribe - replaySubject onNext 31 subscribe - replaySubject onNext 32 subscribe - replaySubject onNext 33 subscribe - replaySubject onNext 34 subscribe - replaySubject onNext 35 subscribe - replaySubject onNext 36 subscribe - replaySubject onNext 37 subscribe - replaySubject onNext 38 subscribe - replaySubject onNext 39 subscribe - replaySubject onNext 40 subscribe - replaySubject onNext 41 subscribe - replaySubject onNext 42 subscribe - replaySubject onNext 43 subscribe - replaySubject onNext 44 subscribe - replaySubject onNext 45 subscribe - replaySubject onNext 46 subscribe - replaySubject onNext 47 subscribe - replaySubject onNext 48 subscribe - replaySubject onNext 49 subscribe - replaySubject onNext 50 subscribe - replaySubject onNext 51 subscribe - replaySubject onNext 52 subscribe - replaySubject onNext 53 subscribe - replaySubject onNext 54 subscribe - replaySubject onNext 55 subscribe - replaySubject onNext 56 subscribe - replaySubject onNext 57 subscribe - replaySubject onNext 58 subscribe - replaySubject onNext 59 subscribe - replaySubject onNext 60 subscribe - replaySubject onNext 61 subscribe - replaySubject onNext 62 subscribe - replaySubject onNext 63 subscribe - replaySubject onNext 64 subscribe - replaySubject onNext 65 subscribe - replaySubject onNext 66 subscribe - replaySubject onNext 67 subscribe - replaySubject onNext 68 subscribe - replaySubject onNext 69 subscribe - replaySubject onNext 70 subscribe - replaySubject onNext 71 subscribe - replaySubject onNext 72 subscribe - replaySubject onNext 73 subscribe - replaySubject onNext 74 subscribe - replaySubject onNext 75 subscribe - replaySubject onNext 76 subscribe - replaySubject onNext 77 subscribe - replaySubject onNext 78 subscribe - replaySubject onNext 79 subscribe - replaySubject onNext 80 subscribe - replaySubject onNext 81 subscribe - replaySubject onNext 82 subscribe - replaySubject onNext 83 subscribe - replaySubject onNext 84 subscribe - replaySubject onNext 85 subscribe - replaySubject onNext 86 subscribe - replaySubject onNext 87 subscribe - replaySubject onNext 88 subscribe - replaySubject onNext 89 subscribe - replaySubject onNext 90 subscribe - replaySubject onNext 91 subscribe - replaySubject onNext 92 subscribe - replaySubject onNext 93 subscribe - replaySubject onNext 94 subscribe - replaySubject onNext 95 subscribe - replaySubject onNext 96 subscribe - replaySubject onNext 97 subscribe - replaySubject onNext 98 subscribe - replaySubject onNext 99 subscribe - replaySubject onNext 100 replaySubjectTest doOnComplete Process finished with exit code 0
[참고링크]
http://reactivex.io/documentation/ko/subject.html
https://duzi077.tistory.com/178
반응형'Android > Rx' 카테고리의 다른 글
RxJava2로 EventBus 구현 하기 (Rxbus) (0) 2020.03.20 SubscribeOn 와 ObserveOn 그리고 Schedulers (0) 2019.10.07