-
Notifications
You must be signed in to change notification settings - Fork 16
Strict Metadata Matcher
enadim edited this page Nov 14, 2017
·
3 revisions
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.
@RibbonClients(defaultConfiguration = RibbonClientsConfig.class)
@SpringBootApplication
public class Application{
...
}
@Configuration
@EnableRibbonDynamicMatcher
public class RibbonClientsConfig {
}ribbon.extensions.rule.dynamic-matcher.enabled=true
ribbon.extensions.rule.dynamic-matcher.key=dynamic-matcher-keyribbon.extensions.client.my-client-name.rule.dynamic-matcher.enabled=true
ribbon.extensions.rule.my-client-name.rule.dynamic-matcher.key=my-dynamic-matcher-keyWhere my-client-name is the ribbon client name

Where current() refers to ExecutionContextHolder.current()