sonyxperiadev / lumber-mill

Where logs are cut into lumber
Apache License 2.0
12 stars 6 forks source link

Pipeline after elasticsearch client runs on okhttp response thread #11

Closed jrask closed 8 years ago

jrask commented 8 years ago

The code below will print the okhttp response thread name but we want the to be invoked on a scheduler thread.

observable.
buffer(1000)
.flatMap (
    AWS.elasticsearch.client (
     ...
    )
).doOnNext { Event e ->
   println Thread.currentThread().getName()
}
jrask commented 8 years ago

Skip this for now, document that it is recommended to use observeOn(scheduler) in the pipeline until we figure out the best way.