dubbo:consumer element

Consumer default configuration. The corresponding clas: org.apache.dubbo.config.ConsumerConfig. It is also default configuration of <dubbo:reference>.

PropertyCorresponding URL parameterTypeRequisiteDefaultEffectDescriptionCompatibility
timeoutdefault.timeoutintN1000performance optimizationinvoking timeout(ms)above 1.0.16
retriesdefault.retriesintN2performance optimizationInvoking retry times, exclude the first invoking. Set 0 to disable it.Only valid if the cluster’s value is failback/failoverabove 1.0.16
loadbalancedefault.loadbalancestringNrandomperformance optimizationLoad balancing strategy. Choices:random, roundrobin(polling), leastactive(invoking least active service)above 1.0.16
asyncdefault.asyncbooleanNfalseperformance optimizationWhether invoke asynchronouslyabove 2.0.0
connectionsdefault.connectionsintN100performance optimizationThe maximum number of connections of per service provider. Only short link protocol such as rmi,http,hessian etc. supports. Long link protocol such as dubbo doesn’t supportabove 1.0.16
genericgenericbooleanNfalseservice governanceWhether default generic interface. A instance of GenericService will be got if true.above 2.0.0
checkcheckbooleanNtrueservice governanceWhether check the survival of provider. If true, throw exception when no provider of some services is alive. Otherwise, just ignore itabove 1.0.16
proxyproxystringNjavassistperformance optimizationJava class compile.It is used for the generating of dynamic class. The options are JDK and javassistabove 2.0.5
ownerownerstringNservice governanceApplication manager. Pls. fill in the mailbox prefix of the person in chargeabove 2.0.5
activesdefault.activesintN0performance optimizationThe max concurrency of per service method for each corresponding consumerabove 2.0.5
clusterdefault.clusterstringNfailoverperformance optimizationCluster tolerance. Choices:failover/failfast/failsafe/failback/forkingabove 2.0.5
filterreference.filterstringNperformance optimizationThe name of filter which intercepts consumer remote invoke. Multiple names are separated by commasabove 2.0.5
listenerinvoker.listenerstringNperformance optimizationThe consumer referenced service listener name. Multiple names are separated by commasabove 2.0.5
registrystringNregister with the registryconfiguration relevantRegister with the designated registry. Generally,for multiple registries, and value is the “id” of <dubbo:registry>. Multiple registries are separated by commas.If you do not want to register the service to any registry,pls set “N/A”above 2.0.5
layerlayerstringNservice governanceThe layer of consumer. Such as: biz, dao, intl:web, china:actonabove 2.0.7
initinitbooleanNfalseperformance optimizationIf true, initialize when “afterPropertiesSet()” is invoked. Otherwise wait until the instance is referenced to initializeabove 2.0.10
cachecachestring/booleanNservice governanceCache return result, and key is call parameters. Choices: lru, threadlocal, jcache and so onat least 2.1.0
validationvalidationbooleanNservice governanceWhether enable JSR303 standard annotation validationat least 2.1.0

Last modified November 25, 2020: fix sample code issue for SPI.md (#659) (0576d68)