此内容没有您所选择的语言版本。

Chapter 5. Changes in microservices patterns


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.

Expand
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.

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

Expand
Removed methodsReplacing methods

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

ServiceDiscovery.create(Vertx)

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

ServiceDiscovery.create(Vertx, ServiceDiscoveryOptions)

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

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);
Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部