Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 5. Changes in microservices patterns

download PDF

This section explains the changes in microservices patterns.

5.1. Changes in Eclipse Vert.x circuit breaker

The following section describes the changes in Eclipse Vert.x circuit breaker.

5.1.1. Removed execute command methods in circuit breaker

The following methods have been removed from the CircuitBreaker class because they cannot be used with futures.

Removed methodsReplacing methods

CircuitBreaker.executeCommand()

CircuitBreaker.execute()

CircuitBreaker.executeCommandWithFallback()

CircuitBreaker.executeWithFallback()

5.2. Changes in Eclipse Vert.x service discovery

The following section describes the changes in Eclipse Vert.x service discovery.

5.2.1. Removed create methods from service discovery that contain ServiceDiscovery argument

The following create methods in service discovery that have Handler<AmqpMessage> as an argument have been removed. These methods cannot be used with futures.

Removed methodsReplacing methods

ServiceDiscovery.create(…​, Handler<ServiceDiscovery> completionHandler)

ServiceDiscovery.create(Vertx)

ServiceDiscovery.create(…​, Handler<ServiceDiscovery> completionHandler)

ServiceDiscovery.create(Vertx, ServiceDiscoveryOptions)

5.2.2. Service importer and exporter methods are no longer fluent

The ServiceDiscovery.registerServiceImporter() and ServiceDiscovery.registerServiceExporter() methods are no longer fluent. The methods return Future<Void>.

5.2.3. Kubernetes service importer is no longer registered automatically

The vertx-service-discovery-bridge-kubernetes adds the KubernetesServiceImporter discovery bridge. The bridge imports services from Kubernetes or Openshift into the Eclipse Vert.x service discovery.

From Eclipse Vert.x 4, this bridge is no longer registered automatically. Even if you have added the bridge in the classpath of your Maven project, it will not be automatically registered.

You must manually register the bridge after creating the ServiceDiscovery instance.

The following example shows you how to manually register the bridge.

JsonObject defaultConf = new JsonObject();
serviceDiscovery.registerServiceImporter(new KubernetesServiceImporter(), defaultConf);
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.