@ZakTaccardi Thanks again, the UI is built using Angular and is given a promise currently for CardResponse, but my question is more on the data layer where both a return of CardResponse and DB insert should happen in parallel.......so if I'm not wrong we should be using schedulers for the same

@ZakTaccardi a controller is given an initial set of parameters like Card details, Merchant Id...etc, the controller calls a service object which in turn looksup the db and generates additional parameters that are required by a specific payment gateway and this is the CardResponse which needs to be returned to the UI and we also have to log the same in DB

Hi! I'm trying to get the max element from my observable. The thing is there can be more than one "max" element and i want to randomize the choice between those when it's the case. Currently i'm using rxjava-math and doing the following:

I'm breaking the comparator contract though even though it's done on purpose. Would there be a more friendly way of doing so ? I was thinking about reducing my elements to a list of all max elements and then shuffling them and taking first but it seems more complicated in terms of code and would probably be less perfomant.