These are chat archives for ReactiveX/RxJava

28th
Apr 2016
Alessandro Vermeulen
@spockz
Apr 28 2016 11:33
@Dorus do I understand doOnNext correctly if I say it doesn't create any subscribers? When I create a Subject and use doOnNext on it the callback isn't called on the onNext, when I use subscribe with an Action1 I see a new subscriber being created and the actual method is called
Dorus
@Dorus
Apr 28 2016 11:34
Nothing happens until you subscribe.
But once you do, both doOnNext and whatever happens in the subscription is called.
Alessandro Vermeulen
@spockz
Apr 28 2016 11:36
@Dorus yes thats what I noticed as well
so it is by design. Okay. :)
Dorus
@Dorus
Apr 28 2016 11:36
This is the very basic of Rx, you write an reactive program, you specify 'if this happen, do that'. So with source.doOnNext(action), you say 'If the source emit, do action'. Once you call subscribe, you say 'source please start emitting'
Alessandro Vermeulen
@spockz
Apr 28 2016 11:37
@Dorus yes but somehow I expected doOnError to be a shorthand for subscribing
Dorus
@Dorus
Apr 28 2016 11:38
no, it's a hook into the pipeline to add side effects to the sequence.
Alessandro Vermeulen
@spockz
Apr 28 2016 11:40
@Dorus now I remember indeed
Josh Durbin
@joshdurbin
Apr 28 2016 23:17
Heya folks
I’m struggling with how to architect an rx flow for user account creation..
Essentially what I want to do is:
  1. check a rx data store to see if a record exists for a username
  2. if record exists, error, else continue
  3. insert user object in rx data store using encryption tools (blocking)
  4. create jwt token using data from (3)
Does it make sense to have that as one starting stream (from the query in step 1) to the end?
amitahirrao
@amitahirrao
Apr 28 2016 23:44
Hi, I was in the process of selecting a Reactive framework for my project and was comparing it to Spring Reactor . Thoughts? suggestions?