vert-x3 / vertx-service-discovery

Some tools one can use for doing microservices with Vert.x
Apache License 2.0
115 stars 67 forks source link

Missing RxJava2 version of KubernetesServiceImporter #75

Closed codepitbull closed 6 years ago

codepitbull commented 6 years ago

There is a RxJava2-version of ServiceDiscovery (io.vertx.reactivex.servicediscovery.ServiceDiscovery) but no counterpart of KubernetesServiceImporter. I gave the others a quick glance and looks like none of the bridges include RxJava2-versions of their classes which renders a RxJava2-ServiceDiscovery useless.

cescoffier commented 6 years ago

Why bridges should have a RX Java 2 generation ? It's only used internally by the service discovery

codepitbull commented 6 years ago

When using io.vertx.reactivex.servicediscovery.ServiceDiscovery one can only provide rxified-versions for the importers: The following code fails if you try to use a non-rxified ServiceImporter with a rxified-ServiceDiscovery

ServiceDiscovery discovery = ServiceDiscovery.create(vertx.getDelegate());
discovery.registerServiceImporter(new KubernetesServiceImporter(), new JsonObject());
cescoffier commented 6 years ago

Oh, I see... documentation issue ;-) The Kubernetes bridge is automatically added if it found it in your classpath. No need to register it explicitly.

codepitbull commented 6 years ago

Aaaaah, ok, that solves the issue :) Should I open a new bug?

cescoffier commented 6 years ago

Yes please, about the documentation that is not "as good as it should be" ;-)