Skip to content

Strict Metadata Matcher

Nadim Benabdenbi edited this page May 22, 2018 · 3 revisions

Strict Metadata Matcher

Strict metadata matcher is designed to target servers with a specific set of metadata info. It does a round robin balancing when multiple servers have the desired set of metadata info.

⚠️ If no server has the desired metadata info the routing will fail.

Usage

@RibbonClients(defaultConfiguration = RibbonClientsConfig.class)
@SpringBootApplication
public class Application{
...
}

@Configuration
@EnableRibbonStrictMetadataMatcher
public class RibbonClientsConfig {
}

Configuration

Default configuration

ribbon.extensions.rule.strict-metadata-matcher.enabled=true

Customization for a specific ribbon client

ribbon.extensions.client.my-client-name.rule.strict-metadata-matcher.enabled=true

Where my-client-name is the ribbon client name

Illustration

Illustration

Where current() refers to ExecutionContextHolder.current()