0

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?

Punit Goel
  • 59
  • 1
  • 6

1 Answers1

1

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.

tsegismont
  • 8,591
  • 1
  • 17
  • 27
  • I could see that for eg AMQP Bridge, there are two options in reactive way one is io.vertx.reactivex.amqpbridge or other is io.vertx.rxjava.amqpbridge . I wanted to know the differences in using either of these – Punit Goel Sep 19 '18 at 11:16
  • The former is the RxJava2 API, the latter RxJava1 – tsegismont Sep 19 '18 at 15:07