-
Notifications
You must be signed in to change notification settings - Fork 16
Dynamic Metadata Matcher
Nadim Benabdenbi edited this page Dec 7, 2017
·
1 revision
Dynamic metadata matcher is designed to target servers with a specific metadata info. It does a round robin balancing when multiple servers have the desired metadata info.
@RibbonClients(defaultConfiguration = RibbonClientsConfig.class)
@SpringBootApplication
public class Application{
...
}
@Configuration
@EnableRibbonStrictMetadataMatcher
public class RibbonClientsConfig {
}
ribbon.extensions.rule.strict-metadata-matcher.enabled=true
ribbon.extensions.rule.strict-metadata-matcher.matchIfMissing=true
ribbon.extensions.client.my-client-name.rule.strict-metadata-matcher.enabled=true
ribbon.extensions.client.my-client-name.rule.strict-metadata-matcher.matchIfMissing=true
Where my-client-name is the ribbon client name
Where current() refers to ExecutionContextHolder.current()