hi,
you cannot use Pump with RxJava because RxJava has a different control flow system that Vert.x and we don’t integrate RxJava with Vert.x control flow.
The normal way to do, would be to transform the WriteStream into a Subscriber<Buffer> and subscribe it to the Observable<Buffer> and let RxJava do the job.
I do have code for this locally that does add a toSubscriber() to any WriteStream (like Observable with ReadStream) but that is not yet finalised.
You can do it and create a static method that transforms the WriteStream into a Subscriber:
public <T> Subscriber<T> toSubscriber(WriteStream<T> ws) {
return new Subscriber<T>() {
public void onNext(T next) {
ws.write(next);
}
etc...
}
}
Keep in mind you cannot end the WriteStream in this generic way because it does not have an end() method and you need to take care of it outside of this.
--