Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

FR: Return the combination of ServiceInstances in CompositeDiscoveryClients

Đang mở
#1,190 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, spring

Hướng nghiên cứu

Bắt đầu với ReactiveCompositeDiscoveryClient.java và so sánh hành vi của getInstances() với CompositeDiscoveryClient.java. Theo dõi cách các discovery client được cấu hình và xác định các điều kiện bật reactive hiện có, bao gồm KubernetesInformerReactiveDiscoveryClientAutoConfiguration. Hoàn thành khi hành vi có thể cấu hình được yêu cầu cho các kết quả kết hợp đã được đặc tả và được bao phủ cho các biến thể client liên quan.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Currently the ReactiveCompositeDiscoveryClient returns the first non-empty Flux of ServiceInstances when invoking its getInstances() method.
When you use multiple DiscoveryClients and you want to balance traffic over them (e.g. a weighted load balancing strategy towards multiple cloud environments), you will have to disable the spring.cloud.discovery.reactive.enabled and provide your own implementation that replaces the existing ReactiveCompositeDiscoveryClient. Disabling this property also has some impact on other conditionals, such as in KubernetesInformerReactiveDiscoveryClientAutoConfiguration for example

This is manageable, but it feels like returning combined results of DiscoveryClients instead of returning the first non empty flux would often make more sense.

Would it be possible to add a property to switch the behaviour of the ReactiveCompositeDiscoveryClient so that results from DiscoveryClients are combined? (and perhaps also for the non reactive variant CompositeDiscoveryClient)

Ngôn ngữ chính
Java
Star
751
Fork
748
Merge trung bình
19 giờ 58 phút
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của spring-cloud/spring-cloud-commons

Tất cả issue của spring-cloud/spring-cloud-commons

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.