I am using vertx-rx-java
I have two verticles which communicate which each other using EventBus, one of the verticles returns complex object as the result, to do so I created custom MessageCodec and wanted to register it in EventBus.
In standard io.vertx.core.eventbus.EventBus there is a method registerCodec which gives possibility to register custom codecs for this EventBus.
However since I am using io.vertx.rxjava.core.Vertx, by calling vertx.eventBus() I receive io.vertx.rxjava.core.eventbus.EventBus, which doesn't have such method. What is the purpose of removing this method from rxjava EventBus, is it considered bad practice to use custom codecs whens using rxjava? If so, what is the recommended approach?
The only way to add custom codec I found is to call eventBus.getDelegate():
EventBus eb = vertx.eventBus();
((io.vertx.core.eventbus.EventBus) eb.getDelegate()).registerCodec(new StringMessageCodec());
io.vertx.rxjava.core.Vertxclass it returnsio.vertx.rxjava.core.eventbus.EventBuswhich doesn't have such method. - Ruslan Akhundov