spring-cloud / spring-cloud/spring-cloud-consul

ConsulDiscoveryClient getServices() does not take default-query-tag into account

Open
#452 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
822
Forks
539
Avg merge
9h 31m
Merged PRs (30d)
7

Description

We have a mix of different types of services registered in Consul and have tagged our Spring Boot based services with a special tag (e.g. sb). We need a way to be able to filter the list of services returned by ConsulDiscoveryClient to only include services based on this tag.

Our use case is very similar to what's described in #225 but the difference is we do not know the service names so we cannot directly use the enhancements from that issue.

It would be nice if the getServices() method filtered the list of services based on the value of default-query-tag if it is set.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ConsulDiscoveryClient#getServices() entry point and trace how the default-query-tag setting is read and how service names are collected. Verify that, when the setting is present, the returned service list contains only services matching that tag, while existing behavior remains unchanged when it is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
distributed-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.