Reputation: 59
I am new to Vert.x and currently exploring it. I found that in vert.x 3 there are three ways to use 1) Using normal vertex API 2) Using RxJava based API 3) Using Reactive Streams based API
I want to know whether all vertex modules are available in RxJava and Reactive Streams API or there are still some modules where reactive version is not available? Also what can be the shortcomings of using either #2 or #3 against #1?
Upvotes: 0
Views: 879
Reputation: 9128
There is no Reactive Streams based API. There is a Vert.x Reactive Streams module, which simply bridges Vert.x ReadStream
with Reactive Streams Publisher
, and WriteStream
with Subscriber
.
Vert.x core as well as all modules in the stack have an Rxified API. This means all methods working with callbacks will either return a Single
, Completable
or Maybe
. ReadStream
can be converted to Flowable
or Observable
.
A few methods from the Vert.x core and modules API are not available in the Rxified API, but you can easily convert an Rxified Vert.x object to its core counterpart with getDelegate
method.
Upvotes: 1