配置项参考手册

包含 Dubbo 支持的所有配置组件及每个配置组件支持的所有配置项

JVM(-D) 参数

JVM 参数示例值说明
dubbo.{config-name}.{property}-Ddubbo.application.name=“dubbo-demo”

-Ddubbo.registry.address=“nacos://host:port”

-Ddubbo.protocol.port=“20880”

……
Dubbo支持 所有的配置项 以JVM参数格式指定。其中config 是指如 application、registry、protocol 等配置项,而property则是指每个配置项中的具体属性。
dubbo.resolve.file-Ddubbo.resolve.file=/home/ken/…/dubbo-resolve.properties在文件中指定每个接口的直连地址url,如:org.apache.dubbo.demo.DemoService=tri://127.0.0.1:50051/org.apache.dubbo.demo.DemoService?xxx=xxx
org.graalvm.nativeimage.imagecodehttps://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java
dubbo.properties.file-Ddubbo.properties.file=foo.properties指定 properties 配置文件地址,可以是绝对路径或者classpath相对路径。默认值为 dubbo.properties
dubbo.jstack-dump.max-line-Ddubbo.jstack-dump.max-line=20Dubbo 支持自动打印调用堆栈,这个参数可以控制堆栈行数,如示例中只会打印前20行堆栈
dubbo.json-framework.prefer-Ddubbo.json-framework.prefer=gson设置框架中 json 序列化的具体实现,目前可选实现有 fastjson2fastjsongsonjackson。默认情况,框架会自动查找可用实现,以上按顺序优先级依次降低
dubbo.network.interface.ignored-Ddubbo.network.interface.ignored=eth1,eth2在多网卡环境下,当需要手动控制注册到注册中心的网卡地址时使用。用于排除某些网卡
dubbo.network.interface.preferred-Ddubbo.network.interface.ignored=eth0在多网卡环境下,当需要手动控制注册到注册中心的网卡地址时使用。用于指定一个特定网卡
sun.rmi.transport.tcp.responseTimeout-Dsun.rmi.transport.tcp.responseTimeout=5000用于设置 RMI 协议下的超时时间,单位ms
envApollo 配置中心特有参数
app.idApollo 配置中心特有参数
apollo.clusterApollo 配置中心特有参数
apollo.metaApollo 配置中心特有参数
dubbo.mapping.cache.filePath-Ddubbo.mapping.cache.filePath=~/.dubbo/mapping/用于设置接口-应用映射关系缓存文件,通常用于服务发现。文件绝对路径地址
dubbo.mapping.cache.fileName-Ddubbo.mapping.cache.fileName=dubbo-mapping用于设置接口-应用映射关系缓存文件,通常用于服务发现。文件名,如此示例最终会读取和存储在文件 dubbo-mapping.dubbo.cache
dubbo.mapping.cache.entrySize-Ddubbo.mapping.cache.maxFileSize=300用于设置接口-应用映射关系缓存文件,通常用于服务发现。文件名中内容最大条目数限制
dubbo.mapping.cache.maxFileSize-Ddubbo.mapping.cache.maxFileSize=104857600用于设置接口-应用映射关系缓存文件,通常用于服务发现。文件最大占用空间限制,单位byte
dubbo.meta.cache.filePath-Ddubbo.meta.cache.filePath=~/.dubbo/meta/用于设置metadata元数据缓存文件,通常用于服务发现。文件绝对路径地址
dubbo.meta.cache.fileName-Ddubbo.meta.cache.fileName=dubbo-meta用于设置metadata元数据缓存文件,通常用于服务发现。文件名,如此示例最终会读取和存储在文件 dubbo-meta.dubbo.cache
dubbo.meta.cache.entrySize-Ddubbo.meta.cache.maxFileSize=300用于设置metadata元数据缓存文件,通常用于服务发现。文件名中内容最大条目数限制
dubbo.meta.cache.maxFileSize-Ddubbo.meta.cache.maxFileSize=104857600用于设置metadata元数据缓存文件,通常用于服务发现。文件最大占用空间限制,单位byte
dubbo.application.use-secure-random-request-id-Ddubbo.application.use-secure-random-request-id=true设置每次 rpc 调用 request id 的生成规则,是不是用随机值。如不设置则使用递增值。
dubbo.protocol.default-close-timeout-Ddubbo.protocol.default-close-timeout=10000设置 tcp server 关闭等待时间,单位毫秒ms
dubbo.protocol.default-heartbeat-Ddubbo.protocol.default-heartbeat=10000设置发起心跳 heartbeat 的间隔,单位毫秒ms
dubbo.hessian.allowNonSerializable是否允许对没有实现 Serializable 接口的类进行序列化,对hessian序列化有效
dubbo.application.hessian2.whitelist-Ddubbo.application.hessian2.whitelist=true设置是否启用白名单机制,对hessian序列化有效。如果设置 true,则继续配置下面的 allow 规则;否则,配置 deny 规则
dubbo.application.hessian2.allow-Ddubbo.application.hessian2.allow=org.apache.dubbo.;com.company.如果设置 true,则继续配置配置 allow 规则,参见文档说明
dubbo.application.hessian2.deny-Ddubbo.application.hessian2.deny=org.apache.dubbo.;io.commons.如果设置 false,则继续配置配置 deny 规则,参见文档说明
dubbo.application.manual-register-Ddubbo.application.manual-register=true设置之后,所有服务都不会被自动注册到注册中心,直到用户调用 online 等命令手动完成注册
dubbo.compact.enable
dubbo.migration-file.enable-Ddubbo.migration-file.enable=true在往应用级地址发现迁移时,是否启用规则文件读取
dubbo.migration.file-Ddubbo.migration.file=dubbo-migration.yaml指定往应用级地址发现迁移的规则文件路径,可以是绝对路径或者classpath相对路径。默认值为 dubbo-migration.yaml
dubbo.application.logger-Ddubbo.application.logger=slf4j设置dubbo框架使用的日志组件,设置后,dubbo框架自身的日志将打印到这里(不影响应用自身);目前支持的 slf4j、log4j、log4j2 等,设置之后须确保相应的组件依赖已经加入应用。
dubbo.properties.file-Ddubbo.properties.file=foo.properties指定 properties 配置文件地址,可以是绝对路径或者classpath相对路径。默认值为 dubbo.properties

环境变量

环境变量示例值说明
DUBBO{CONFIG-NAME}.{PROPERTY}DUBBO_APPLICATION_NAME=“dubbo-demo”

DUBBO_REGISTRY_ADDRESS=“nacos://host:port”

DUBBO_PROTOCOL_PORT=“20880”

……
Dubbo支持所有的配置项以环境变量格式指定。其中CONFIG-NAME 是指如 application、registry、protocol 等配置项,而 PROPERTY则是指每个配置项中的具体属性。
DUBBO_DEFAULT_SERIALIZATIONDUBBO_DEFAULT_SERIALIZATION=“hessan2”设置框架的默认序列化方式,如hessian2、fastjson2、msgpack等
DUBBO2_COMPACT_ENABLEDUBBO2_COMPAT_ENABLE=“true”
DUBBO_ENV_KEYSDUBBO_LABELS=“tag1=value1; tag2=value2”tag1=value1会作为附加参数上报到地址 URL,作为系统环境变量可用于为实例打标等。
DUBBO_LABELSDUBBO_ENV_KEYS=“DUBBO_TAG1, DUBBO_TAG2”Dubbo 会读取 DUBBO_TAG1DUBBO_TAG2两个环境变量,并将读取的值 value DUBBO_TAG1=value 作为附加参数上报到地址 URL。
POD_NAMESPACE用于 Kubernetes Service 场景,指定命名空间
CLUSTER_DOMAIN用于 Kubernetes Service 场景,指定集群名称,默认 default
DUBBO_IP_TO_REGISTRYDUBBO_IP_TO_REGISTRY=30.123.45.187指定注册到注册中心 URL 中的 ip 地址
DUBBO_PORT_TO_REGISTRYDUBBO_PORT_TO_REGISTRY=20880指定注册到注册中心 URL 中的 port 端口号
DUBBO{PROTOCOL}PORT_TO_REGISTRYDUBBO_DUBBO_IP_TO_REGISTRY=30.123.45.187

DUBBO_TRI_IP_TO_REGISTRY=30.123.45.187
指定注册到注册中心 URL 中的 ip 地址,可以为不同协议指定不同 ip
DUBBO{PROTOCOL}PORT_TO_REGISTRYDUBBO_DUBBO_PORT_TO_REGISTRY=20880

DUBBO_TRI_PORT_TO_REGISTRY=50051
指定注册到注册中心 URL 中的 port 端口,可以为不同协议指定不同 port
DUBBO_IP_TO_BINDDUBBO_IP_TO_BIND=30.123.45.187指定 tcp 监听绑定的 ip 地址
DUBBO_PORT_TO_BINDDUBBO_PORT_TO_BIND=20880指定 tcp 监听绑定的 port 端口
DUBBO{PROTOCOL}IP_TO_BINDDUBBO_DUBBO_IP_TO_BIND=30.123.45.187

DUBBO_TRI_IP_TO_BIND=30.123.45.187
指定 tcp 监听绑定的 ip 地址,可以为不同协议指定不同 ip
DUBBO{PROTOCOL}_PORT_TO_BINDDUBBO_DUBBO_PORT_TO_BIND=20880

DUBBO_TRI_PORT_TO_BIND=50051
指定 tcp 监听绑定的 port 端口,可以为不同协议指定不同 port
dubbo.properties.filedubbo.properties.file=foo.properties指定 properties 配置文件地址,可以是绝对路径或者classpath相对路径。默认值为 dubbo.properties
dubbo.migration.filedubbo.migration.file=dubbo-migration.yaml指定应用级地址发现的迁移规则的文件地址,可以是绝对路径或者classpath相对路径。默认值为 dubbo-migration.yaml

配置项手册

不论您是使用 Spring Boot、XML、注解还是 API 编写 Dubbo 应用,都可以通过以下表格参考每一项的具体含义。

dubbo.tracing.baggage.correlation

Class: org.apache.dubbo.config.nested.BaggageConfig$Correlation

KeyTypeDescriptionDefault valueDeprecation
enabledjava.lang.BooleanWhether to enable correlation of the baggage context with logging contexts.true
fieldsjava.util.List<java.lang.String>List of fields that should be correlated with the logging context. That means that these fields would end up as key-value pairs in e.g. MDC.

dubbo.tracing.tracing-exporter.otlp-config

Class: org.apache.dubbo.config.nested.ExporterConfig$OtlpConfig

KeyTypeDescriptionDefault valueDeprecation
compression-methodjava.lang.StringThe method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include “gzip” and “none”.none
endpointjava.lang.StringURL to the Otlp API.
headersjava.util.Map<java.lang.String,java.lang.String>
timeoutjava.time.DurationThe maximum time to wait for the collector to process an exported batch of spans. (seconds)10

dubbo.tracing.tracing-exporter.zipkin-config

Class: org.apache.dubbo.config.nested.ExporterConfig$ZipkinConfig

KeyTypeDescriptionDefault valueDeprecation
connect-timeoutjava.time.DurationConnection timeout for requests to Zipkin. (seconds)1
endpointjava.lang.StringURL to the Zipkin API.
read-timeoutjava.time.DurationRead timeout for requests to Zipkin. (seconds)10

dubbo.metrics.prometheus.exporter

Class: org.apache.dubbo.config.nested.PrometheusConfig$Exporter

KeyTypeDescriptionDefault valueDeprecation
enable-http-service-discoveryjava.lang.BooleanEnable http service discovery for prometheus
enabledjava.lang.BooleanEnable prometheus exporter
http-service-discovery-urljava.lang.StringHttp service discovery url

dubbo.metrics.prometheus.pushgateway

Class: org.apache.dubbo.config.nested.PrometheusConfig$Pushgateway

KeyTypeDescriptionDefault valueDeprecation
base-urljava.lang.StringBase URL for the Pushgateway
enabledjava.lang.BooleanEnable publishing via a Prometheus Pushgateway
jobjava.lang.StringJob identifier for this application instance
passwordjava.lang.StringLogin password of the Prometheus Pushgateway
push-intervaljava.lang.IntegerFrequency with which to push metrics
usernamejava.lang.StringLogin user of the Prometheus Pushgateway

Unknown group

Class: Unknown

KeyTypeDescriptionDefault valueDeprecation
dubbo.config-center.include-spring-envjava.lang.BooleanWhether to include Spring Environment.
dubbo.config.modeorg.apache.dubbo.config.context.ConfigModeConfig processing mode. See <code>org.apache.dubbo.config.context.ConfigMode</code>.
dubbo.config.multiplejava.lang.BooleanWhether to enable multiple configurations in Dubbo, allowing multiple configurations to be loaded and used, default value is <code>true</code>.
dubbo.config.overridejava.lang.BooleanWhether to allow configuration override in Dubbo, default value is <code>true</code>.
dubbo.enabledjava.util.Set<java.lang.String>Whether enable autoconfiguration of dubbo, default value is <code>true</code>.
dubbo.env.keysjava.lang.StringThe keys for specify environment-specific keys, allowing for differentiation and utilization of various runtime environments (e.g., development, testing, production), the multiple-value is delimited by comma.
dubbo.labelsjava.lang.StringThe labels for these service providers, enabling categorization and grouping, thereby enhancing their management and monitoring, the multiple-value is delimited by ‘;’.
dubbo.scan.base-packagesjava.util.Set<java.lang.String>The basePackages to scan, the multiple-value is delimited by comma @see EnableDubbo#scanBasePackages().

dubbo.tracing.baggage

Class: org.apache.dubbo.config.nested.BaggageConfig

KeyTypeDescriptionDefault valueDeprecation
enabledjava.lang.BooleanWhether baggage is enabled or not.true
remote-fieldsjava.util.List<java.lang.String>List of fields that are referenced the same in-process as it is on the wire. For example, the field “x-vcap-request-id” would be set as-is including the prefix.

dubbo.tracing.propagation

Class: org.apache.dubbo.config.nested.PropagationConfig

KeyTypeDescriptionDefault valueDeprecation
typejava.lang.StringTracing context propagation type.W3C

dubbo.tracing.sampling

Class: org.apache.dubbo.config.nested.SamplingConfig

KeyTypeDescriptionDefault valueDeprecation
probabilityjava.lang.FloatProbability in the range from 0.0 to 1.0 that a trace will be sampled.0.1

dubbo.tracing.tracing-exporter

Class: org.apache.dubbo.config.nested.ExporterConfig

KeyTypeDescriptionDefault valueDeprecation

dubbo.rpc.tri

Class: org.apache.dubbo.config.TripleConfig

KeyTypeDescriptionDefault valueDeprecation
enable-pushjava.lang.BooleanWhether to enable push, default is false.
header-table-sizejava.lang.StringThe header table size.
initial-window-sizejava.lang.StringInitial window size.
max-concurrent-streamsjava.lang.StringMaximum concurrent streams.
max-frame-sizejava.lang.StringMaximum frame size.
max-header-list-sizejava.lang.StringMaximum header list size.

dubbo

Class: org.apache.dubbo.spring.boot.autoconfigure.DubboConfigurationProperties

KeyTypeDescriptionDefault valueDeprecation
config-centersjava.util.Map<java.lang.String,org.apache.dubbo.config.ConfigCenterConfig>Multiple configurations for ConfigCenterBean.
consumersjava.util.Map<java.lang.String,org.apache.dubbo.config.ConsumerConfig>Multiple configurations for Consumer.
metadata-reportsjava.util.Map<java.lang.String,org.apache.dubbo.config.MetadataReportConfig>Multiple configurations for MetadataReportConfig.
metricsesjava.util.Map<java.lang.String,org.apache.dubbo.config.MetricsConfig>Multiple configurations for MetricsConfig.
modulesjava.util.Map<java.lang.String,org.apache.dubbo.config.ModuleConfig>Multiple configurations for Module.
monitorsjava.util.Map<java.lang.String,org.apache.dubbo.config.MonitorConfig>Multiple configurations for Monitor.
protocolsjava.util.Map<java.lang.String,org.apache.dubbo.config.ProtocolConfig>Multiple configurations for Protocol.
providersjava.util.Map<java.lang.String,org.apache.dubbo.config.ProviderConfig>Multiple configurations for Provider.
registriesjava.util.Map<java.lang.String,org.apache.dubbo.config.RegistryConfig>Multiple configurations for Registry.
tracingsjava.util.Map<java.lang.String,org.apache.dubbo.config.TracingConfig>Multiple configurations for TracingConfig.

dubbo.application

Class: org.apache.dubbo.config.ApplicationConfig

KeyTypeDescriptionDefault valueDeprecation
architecturejava.lang.StringArchitecture layer.
auto-trust-serialize-classjava.lang.BooleanWhether to automatically trust serialized classes.
check-serializablejava.lang.BooleanWhether to check serializable.
compilerjava.lang.StringJava compiler.
defaultjava.lang.Boolean
dump-directoryjava.lang.StringDirectory for saving thread dump.
dump-enablejava.lang.BooleanWhether to enable saving thread dump or not.
enable-empty-protectionjava.lang.BooleanWhether to enable protection against empty objects.
enable-file-cachejava.lang.BooleanWhether to enable file caching.
environmentjava.lang.StringEnvironment, e.g., dev, test, or production.
executor-management-modejava.lang.StringThread pool management mode: ‘default’ or ‘isolation’.
idjava.lang.StringIdentifier for this configuration.
liveness-probejava.lang.StringUsed to set extensions of the probe in QoS.
loggerjava.lang.StringThe type of log access.
mapping-retry-intervaljava.lang.IntegerThe retry interval of service name mapping.
meta-datajava.util.Map<java.lang.String,java.lang.String>
metadata-service-portjava.lang.IntegerMetadata Service, used in Service Discovery.
metadata-service-protocoljava.lang.StringThe protocol used for peer-to-peer metadata transmission.
metadata-typejava.lang.StringMetadata type, local or remote. If ‘remote’ is chosen, you need to specify a metadata center further.
monitororg.apache.dubbo.config.MonitorConfigMonitor center.
namejava.lang.StringThe Application name.
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
organizationjava.lang.StringThe application’s organization (BU).
ownerjava.lang.StringThe application owner.
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringThe preferred protocol (name) of this application, convenient for places where it’s hard to determine the preferred protocol.
qos-accept-foreign-ipjava.lang.BooleanShould we accept foreign IP or not?
qos-accept-foreign-ip-compatiblejava.lang.Boolean
qos-accept-foreign-ip-whitelistjava.lang.StringWhen we disable accepting foreign IP, support specifying foreign IPs in the whitelist.
qos-accept-foreign-ip-whitelist-compatiblejava.lang.String
qos-anonymous-access-permission-leveljava.lang.StringThe anonymous (any foreign IP) access permission level, default is NONE, which means no access to any command.
qos-anonymous-access-permission-level-compatiblejava.lang.String
qos-anonymous-allow-commandsjava.lang.StringThe anonymous (any foreign IP) allowed commands, default is empty, which means no access to any command.
qos-checkjava.lang.BooleanWhether QoS should start successfully or not, will check qosEnable first.
qos-enablejava.lang.BooleanWhether to enable Quality of Service (QoS) or not.
qos-enable-compatiblejava.lang.Boolean
qos-hostjava.lang.StringThe QoS host to listen.
qos-host-compatiblejava.lang.String
qos-portjava.lang.IntegerThe QoS port to listen.
qos-port-compatiblejava.lang.Integer
readiness-probejava.lang.StringThe probe for checking the readiness of the application.
register-consumerjava.lang.BooleanUsed to control whether to register the instance with the registry or not. Set to ‘false’ only when the instance is a pure consumer.
register-modejava.lang.StringRegister mode.
registriesjava.util.List<org.apache.dubbo.config.RegistryConfig>Registry centers.
registryorg.apache.dubbo.config.RegistryConfig
registry-idsjava.lang.StringThe comma-separated list of registry IDs to which the service will be registered.
repositoryjava.lang.StringRepository.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
serialize-check-statusjava.lang.StringThe status of class serialization checking.
shutwaitjava.lang.StringConfig the shutdown wait.
startup-probejava.lang.StringThe probe for checking the startup of the application.
trust-serialize-class-leveljava.lang.IntegerThe trust level for serialized classes.
versionjava.lang.StringThe application version.

dubbo.config-center

Class: org.apache.dubbo.config.ConfigCenterConfig

KeyTypeDescriptionDefault valueDeprecation
addressjava.lang.StringThe address (URL or hostname) of the config center server.
app-config-filejava.lang.StringThe properties file under ‘configFile’ is global shared, while ‘.properties’ under this one is limited only to this application.
app-external-configurationjava.util.Map<java.lang.String,java.lang.String>Application-specific external configuration for the config center.
checkjava.lang.BooleanBehavior when the initial connection attempt to the config center fails. ‘true’ means interrupt the whole process once a failure occurs. Default value is true.
clusterjava.lang.StringThe config center cluster, its actual meaning may vary depending on the specific config center product.
config-filejava.lang.StringKey mapping for properties files. Most of the time, you do not need to change this parameter. Default value is CommonConstants.DEFAULT_DUBBO_PROPERTIES.
defaultjava.lang.Boolean
external-configurationjava.util.Map<java.lang.String,java.lang.String>External configuration for the config center.
groupjava.lang.StringThe group of the config center, often used to identify an isolated space for a batch of config items. Its actual meaning depends on the specific config center you use. Default value is CommonConstants.DUBBO.
highest-priorityjava.lang.BooleanIf the config center should have the highest priority and override all other configurations. Deprecated and no longer used. Default value is true.Reason: null, use for replacement: null
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
namespacejava.lang.StringThe namespace of the config center, generally used for multi-tenancy. Its actual meaning depends on the specific config center you use. Default value is CommonConstants.DUBBO.
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
parametersjava.util.Map<java.lang.String,java.lang.String>Additional parameters specific to your config center product can be added here. For example, with XML: <dubbo:config-center> <dubbo:parameter key=”{your key}” value=”{your value}” /> </dubbo:config-center>
passwordjava.lang.StringPassword for authentication with the config center.
portjava.lang.IntegerThe port number for the config center server.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringThe protocol used for accessing the config center.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
timeoutjava.lang.LongThe timeout for accessing the config center. Default value is 30000L.
usernamejava.lang.StringUsername for authentication with the config center.

dubbo.consumer

Class: org.apache.dubbo.config.ConsumerConfig

KeyTypeDescriptionDefault valueDeprecation
activesjava.lang.IntegerMaximum concurrent invocations allowed.
applicationorg.apache.dubbo.config.ApplicationConfigApplication configuration for the service.Reason: null, use for replacement: null
asyncjava.lang.BooleanEnable asynchronous invocation. Note that it is unreliable asynchronous, ignoring return values and not blocking threads.
authjava.lang.BooleanEnable service authentication.
cachejava.lang.StringCache provider for caching return results. available options: lru, threadlocal, jcache etc.
callbacksjava.lang.IntegerCallback limits for the service.
checkjava.lang.BooleanCheck if service provider exists, if not exists, it will be fast fail
clientjava.lang.Stringclient type
clusterjava.lang.StringCluster type for service.
config-centerorg.apache.dubbo.config.ConfigCenterConfigConfiguration center settings.Reason: null, use for replacement: null
connectionsjava.lang.IntegerConnection limits: 0 for shared connection, otherwise specifying connections for the service.
corethreadsjava.lang.IntegerConsumer threadpool core thread size
defaultjava.lang.Boolean
exported-urlsjava.util.List<org.apache.dubbo.common.URL>
filterjava.lang.StringFilters for service exposure or reference (multiple filters can be separated by commas).
forksjava.lang.IntegerForks for forking cluster.
genericjava.lang.StringWhether to use generic interface
groupjava.lang.StringGroup of the remote service referenced by the consumer/provider.
idjava.lang.StringIdentifier for this configuration.
initjava.lang.BooleanWhether to eagle-init
injvmjava.lang.BooleanWhether to find reference’s instance from the current JVMReason: null, use for replacement: null
interfacejava.lang.String
layerjava.lang.StringLayer of service providers.
lazyjava.lang.BooleanLazy create connection
listenerjava.lang.StringListeners for service exposure or reference (multiple listeners can be separated by commas).
loadbalancejava.lang.StringLoad balancing strategy for service invocation.
localjava.lang.StringLocal implementation class name for the service interface.Reason: null, use for replacement: null
mergerjava.lang.StringMerger for result data.
mesh-enablejava.lang.Booleanenable mesh mode @since 3.1.0
meta-datajava.util.Map<java.lang.String,java.lang.String>
metadata-report-configorg.apache.dubbo.config.MetadataReportConfigMetadata report configuration.Reason: null, use for replacement: null
methodsjava.util.List<org.apache.dubbo.config.MethodConfig>Method-specific configuration.
mockjava.lang.StringMock class name to be called when a service fails to execute. The mock doesn’t support on the provider side, and it is executed when a non-business exception occurs after a remote service call.
moduleorg.apache.dubbo.config.ModuleConfigModule configuration for the service.Reason: null, use for replacement: null
monitororg.apache.dubbo.config.MonitorConfigService monitoring configuration.Reason: null, use for replacement: null
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
onconnectjava.lang.StringEvent handler for connection establishment.
ondisconnectjava.lang.StringEvent handler for disconnection.
ownerjava.lang.StringOwner of the service providers.
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters for configuration.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringOnly the service provider of the specified protocol is invoked, and other protocols are ignored.
provided-byjava.lang.Stringdeclares which app or service this interface belongs to
provider-namespacejava.lang.Stringassign the namespace that provider belong to @since 3.1.1
provider-portjava.lang.IntegerBy VirtualService and DestinationRule, envoy will generate a new route rule,such as ‘demo.default.svc.cluster.local:80’,the default port is 80. When you want to specify the provider port,you can use this config. @since 3.1.0
proxyjava.lang.StringStrategy for generating dynamic agents (options: “jdk” or “javassist”).
queuesjava.lang.IntegerConsumer threadpool queue size
reconnectjava.lang.String
refer-asyncjava.lang.BooleanWeather the reference is referred asynchronously @see ModuleConfig#referAsync @deprecatedReason: null, use for replacement: null
refer-backgroundjava.lang.BooleanWhether refer should run in background or not. @see ModuleConfig#setBackground(Boolean) @deprecated replace with {@link ModuleConfig#setBackground(Boolean)}Reason: null, use for replacement: null
refer-thread-numjava.lang.IntegerThread num for asynchronous refer pool size
registriesjava.util.List<org.apache.dubbo.config.RegistryConfig>Registries where the service will be registered (use this or registryIds, not both).
registryorg.apache.dubbo.config.RegistryConfig
registry-idsjava.lang.StringRegistry IDs for service registration (use this or registries, not both).
retriesjava.lang.IntegerRetry times for failed invocations.
routerjava.lang.String
scopejava.lang.StringService scope (“local” implies searching in the current JVM only).
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
sentjava.lang.BooleanAcknowledge asynchronous-sent invocations.
shareconnectionsjava.lang.IntegerBy default, a TCP long-connection communication is shared between the consumer process and the provider process. This property can be set to share multiple TCP long-connection communications. Note that only the dubbo protocol takes effect.
singletonjava.lang.BooleanUse separate instances for services with the same serviceKey (applies when using ReferenceConfig and SimpleReferenceCache together). Directly calling ReferenceConfig.get() will not check this attribute.
stickyjava.lang.Boolean
stubjava.lang.StringLocal stub class name for the service interface.
tagjava.lang.StringCustom tag for the service configuration.
threadpooljava.lang.StringConsumer thread pool type: cached, fixed, limit, eager
threadsjava.lang.IntegerConsumer threadpool thread size
timeoutjava.lang.IntegerTimeout for remote invocation in milliseconds.
url-merge-processorjava.lang.StringUrl Merge Processor Used to customize the URL merge of consumer and provider
validationjava.lang.StringEnable JSR303 standard annotation validation for method parameters.
versionjava.lang.StringVersion of the remote service referenced by the consumer/provider.

dubbo.metadata-report

Class: org.apache.dubbo.config.MetadataReportConfig

KeyTypeDescriptionDefault valueDeprecation
addressjava.lang.StringThe address of the metadata center.
checkjava.lang.BooleanDecide the behavior when the initial connection attempt fails, where ‘true’ means interrupt the whole process once it fails. The default value is true.
clusterjava.lang.BooleanWhether to use a cluster configuration for the metadata center.
cycle-reportjava.lang.BooleanBy default, the metadata store will store full metadata repeatedly every day.
defaultjava.lang.Boolean
filejava.lang.StringThe file path for saving the metadata center’s dynamic list.
groupjava.lang.StringThe group for the metadata center, which is similar to the registry group.
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters for the metadata center.
passwordjava.lang.StringThe password used to log in to the metadata center.
portjava.lang.IntegerThe default port for the metadata center.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringThe protocol for the metadata center.
registryjava.lang.StringThe registry ID for the metadata center.
report-definitionjava.lang.BooleanWhether to report definition.
report-metadatajava.lang.BooleanWhether to report metadata.
retry-periodjava.lang.IntegerThe retry period in milliseconds when connecting to the metadata center.
retry-timesjava.lang.IntegerThe number of retry times when connecting to the metadata center.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
sync-reportjava.lang.BooleanSynchronization report, with the default value as asynchronous.
timeoutjava.lang.IntegerThe request timeout in milliseconds for the metadata center.
usernamejava.lang.StringThe username used to log in to the metadata center.

dubbo.metrics

Class: org.apache.dubbo.config.MetricsConfig

KeyTypeDescriptionDefault valueDeprecation
collector-sync-periodjava.lang.IntegerCollector synchronization period.
defaultjava.lang.Boolean
enable-collector-syncjava.lang.BooleanWhether to enable collector synchronization.
enable-jvmjava.lang.BooleanWhether to enable JVM metrics collection.
enable-metadatajava.lang.BooleanWhether to enable metadata metrics collection.
enable-metrics-initjava.lang.BooleanWhether to enable metrics initialization.
enable-nettyjava.lang.BooleanWhether to enable Netty metrics collection.
enable-registryjava.lang.BooleanWhether to enable registry metrics collection.
enable-rpcjava.lang.BooleanWhether to enable RPC (Remote Procedure Call) metrics collection.
enable-threadpooljava.lang.BooleanWhether to enable thread pool metrics collection.
export-metrics-servicejava.lang.BooleanWhether to export metrics service.
export-service-portjava.lang.IntegerPort used for exporting metrics services.
export-service-protocoljava.lang.StringProtocol used for metrics collection and export.
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
portjava.lang.StringDeprecated: This parameter should no longer be used and will be removed in the future.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringProtocol used for metrics.
rpc-leveljava.lang.StringThe level of metrics collection, which can be “SERVICE” or “METHOD”. The default is “METHOD”.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
use-global-registryjava.lang.BooleanDecide whether to use the global registry of Micrometer.

dubbo.module

Class: org.apache.dubbo.config.ModuleConfig

KeyTypeDescriptionDefault valueDeprecation
backgroundjava.lang.BooleanWhether to start the module in the background. If started in the background, it does not await finish on Spring ContextRefreshedEvent. @see org.apache.dubbo.config.spring.context.DubboDeployApplicationListener
check-reference-timeoutjava.lang.LongThe timeout to check references.
defaultjava.lang.Boolean
export-asyncjava.lang.BooleanWhether the service is exported asynchronously.
export-thread-numjava.lang.IntegerThe thread number for asynchronous export pool size.
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
monitororg.apache.dubbo.config.MonitorConfigMonitor center
namejava.lang.StringThe module name
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
organizationjava.lang.StringThe module’s organization
ownerjava.lang.StringThe module owner
prefixesjava.util.List<java.lang.String>
refer-asyncjava.lang.BooleanWhether the reference is referred asynchronously.
refer-thread-numjava.lang.IntegerThe thread number for asynchronous reference pool size.
registriesjava.util.List<org.apache.dubbo.config.RegistryConfig>Registry centers
registryorg.apache.dubbo.config.RegistryConfig
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
versionjava.lang.StringThe module version

dubbo.monitor

Class: org.apache.dubbo.config.MonitorConfig

KeyTypeDescriptionDefault valueDeprecation
addressjava.lang.StringThe monitor address
defaultjava.lang.Boolean
groupjava.lang.StringThe monitor group
idjava.lang.StringIdentifier for this configuration.
intervaljava.lang.StringThe monitor reporting interval
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters
passwordjava.lang.StringThe monitor password
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringThe protocol of the monitor. If the value is “registry” it will search the monitor address from the registry center. Otherwise, it will directly connect to the monitor center.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
usernamejava.lang.StringThe monitor username
versionjava.lang.StringThe monitor version

dubbo.protocol

Class: org.apache.dubbo.config.ProtocolConfig

KeyTypeDescriptionDefault valueDeprecation
acceptsjava.lang.IntegerThe maximum acceptable connections.
accesslogjava.lang.StringThe access log configuration.
alivejava.lang.IntegerThe keep-alive time for threads in the thread pool (default unit is TimeUnit.MILLISECONDS).
bufferjava.lang.IntegerThe buffer size.
charsetjava.lang.StringThe character set used for communication.
clientjava.lang.StringThe client implementation.
codecjava.lang.StringThe protocol codec.
contextpathjava.lang.StringThe context path for the service.
corethreadsjava.lang.IntegerThe core thread size of the thread pool.
defaultjava.lang.Boolean
dispatcherjava.lang.StringThe thread dispatch mode.
dispatherjava.lang.StringReason: null, use for replacement: null
exchangerjava.lang.StringThe method of information exchange.
ext-protocoljava.lang.StringExtra protocol for this service, using Port Unification Server.
extensionjava.lang.StringAdditional extensions.
heartbeatjava.lang.IntegerThe interval for sending heartbeats.
hostjava.lang.StringThe service’s IP address (useful when there are multiple network cards available).
idjava.lang.StringIdentifier for this configuration.
iothreadsjava.lang.IntegerThe fixed size of the IO thread pool.
json-check-leveljava.lang.StringJSON check level for serialization.
keep-alivejava.lang.BooleanIndicates whether it is a persistent connection.
meta-datajava.util.Map<java.lang.String,java.lang.String>
namejava.lang.StringThe name of the protocol.
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
networkerjava.lang.StringThe networker implementation.
optimizerjava.lang.StringThe optimizer used for dubbo protocol.
parametersjava.util.Map<java.lang.String,java.lang.String>Custom parameters.
pathjava.lang.StringReason: null, use for replacement: null
payloadjava.lang.IntegerThe maximum payload length.
portjava.lang.IntegerThe service’s port number.
prefer-serializationjava.lang.StringSpecifies the preferred serialization method for the consumer. If specified, the consumer will use this parameter first. If the Dubbo Sdk you are using contains the serialization type, the serialization method specified by the argument is used. <p> When this parameter is null or the serialization type specified by this parameter does not exist in the Dubbo SDK, the serialization type specified by serialization is used. If the Dubbo SDK if still does not exist, the default type of the Dubbo SDK is used. For Dubbo SDK >= 3.2, <code>preferSerialization</code> takes precedence over <code>serialization</code> <p> Supports multiple values separated by commas, e.g., “fastjson2,fastjson,hessian2”.
prefixesjava.util.List<java.lang.String>
promptjava.lang.StringThe command line prompt.
queuesjava.lang.IntegerThe length of the thread pool’s queue.
registerjava.lang.BooleanIndicates whether the service should be registered.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
serializationjava.lang.StringThe serialization method.
serverjava.lang.StringThe server implementation.
ssl-enabledjava.lang.BooleanIndicates whether SSL is enabled.
statusjava.lang.StringThe status check configuration.
telnetjava.lang.StringSupported Telnet commands, separated by commas.
thread-pool-exhausted-listenersjava.lang.StringListeners for exhausted thread pool.
threadpooljava.lang.StringThe name of the thread pool.
threadsjava.lang.IntegerThe fixed size of the thread pool.
transporterjava.lang.StringThe transporter used for communication.

dubbo.provider

Class: org.apache.dubbo.config.ProviderConfig

KeyTypeDescriptionDefault valueDeprecation
acceptsjava.lang.IntegerThe maximum number of acceptable connections.
accesslogjava.lang.StringWhether to export access logs to logs.
activesjava.lang.IntegerMaximum concurrent invocations allowed.
alivejava.lang.IntegerThe keep-alive time of the thread pool, default unit: TimeUnit.MILLISECONDS.
applicationorg.apache.dubbo.config.ApplicationConfigApplication configuration for the service.Reason: null, use for replacement: null
asyncjava.lang.BooleanEnable asynchronous invocation. Note that it is unreliable asynchronous, ignoring return values and not blocking threads.
authjava.lang.BooleanEnable service authentication.
bufferjava.lang.IntegerThe size of the network I/O buffer.
cachejava.lang.StringCache provider for caching return results. available options: lru, threadlocal, jcache etc.
callbacksjava.lang.IntegerCallback limits for the service.
charsetjava.lang.StringThe charset used for serialization.
clientjava.lang.StringThe client-side implementation model of the protocol.
clusterjava.lang.StringCluster type for service.
codecjava.lang.StringThe codec used by the protocol.
config-centerorg.apache.dubbo.config.ConfigCenterConfigConfiguration center settings.Reason: null, use for replacement: null
connectionsjava.lang.IntegerConnection limits: 0 for shared connection, otherwise specifying connections for the service.
contextpathjava.lang.StringThe context path of the service.
defaultjava.lang.Boolean
delayjava.lang.IntegerThe time delay to register the service (in milliseconds).
deprecatedjava.lang.BooleanWhether the service is deprecated.
dispatcherjava.lang.StringThe mode of thread dispatching.
dispatherjava.lang.StringReason: null, use for replacement: null
documentjava.lang.StringDocument center for the service.
dynamicjava.lang.BooleanWhether to register the service as a dynamic service on the registry. If true, the service will be enabled automatically after registration, and manual disabling is required to stop it.
exchangerjava.lang.StringThe method of information exchange.
executesjava.lang.IntegerMax allowed executing times.
executorjava.util.concurrent.Executorused for thread pool isolation between services
exportjava.lang.BooleanWhether to export the service.
export-asyncjava.lang.BooleanWeather the service is export asynchronously @deprecated @see ModuleConfig#exportAsyncReason: null, use for replacement: null
export-backgroundjava.lang.BooleanWhether the export should run in the background or not. @deprecated Replace with {@link ModuleConfig#setBackground(Boolean)} @see ModuleConfig#setBackground(Boolean)Reason: null, use for replacement: null
export-thread-numjava.lang.IntegerThe number of threads for the asynchronous export pool.Reason: null, use for replacement: null
exported-urlsjava.util.List<org.apache.dubbo.common.URL>
filterjava.lang.StringFilters for service exposure or reference (multiple filters can be separated by commas).
forksjava.lang.IntegerForks for forking cluster.
groupjava.lang.StringThe service group.
hostjava.lang.StringThe IP addresses of the service (used when there are multiple network cards available).
idjava.lang.StringIdentifier for this configuration.
interfacejava.lang.String
iothreadsjava.lang.IntegerThe size of the I/O thread pool (fixed size).
layerjava.lang.StringLayer of service providers.
listenerjava.lang.StringListeners for service exposure or reference (multiple listeners can be separated by commas).
loadbalancejava.lang.StringLoad balancing strategy for service invocation.
localjava.lang.StringLocal implementation class name for the service interface.Reason: null, use for replacement: null
mergerjava.lang.StringMerger for result data.
meta-datajava.util.Map<java.lang.String,java.lang.String>
metadata-report-configorg.apache.dubbo.config.MetadataReportConfigMetadata report configuration.Reason: null, use for replacement: null
methodsjava.util.List<org.apache.dubbo.config.MethodConfig>Method-specific configuration.
mockjava.lang.StringMock class name to be called when a service fails to execute. The mock doesn’t support on the provider side, and it is executed when a non-business exception occurs after a remote service call.
moduleorg.apache.dubbo.config.ModuleConfigModule configuration for the service.Reason: null, use for replacement: null
monitororg.apache.dubbo.config.MonitorConfigService monitoring configuration.Reason: null, use for replacement: null
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
networkerjava.lang.StringThe networker used by the protocol.
onconnectjava.lang.StringEvent handler for connection establishment.
ondisconnectjava.lang.StringEvent handler for disconnection.
ownerjava.lang.StringOwner of the service providers.
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters for configuration.
pathjava.lang.StringReason: null, use for replacement: null
payloadjava.lang.IntegerThe maximum payload length.
portjava.lang.IntegerThe port of the service.Reason: null, use for replacement: null
prefer-serializationjava.lang.StringSpecifies the preferred serialization method for the consumer. If specified, the consumer will use this parameter first. If the Dubbo Sdk you are using contains the serialization type, the serialization method specified by the argument is used. <p> When this parameter is null or the serialization type specified by this parameter does not exist in the Dubbo SDK, the serialization type specified by serialization is used. If the Dubbo SDK if still does not exist, the default type of the Dubbo SDK is used. For Dubbo SDK >= 3.2, <code>preferSerialization</code> takes precedence over <code>serialization</code> <p> Supports multiple values separated by commas, e.g., “fastjson2,fastjson,hessian2”.
prefixesjava.util.List<java.lang.String>
promptjava.lang.StringThe command line prompt.
protocolorg.apache.dubbo.config.ProtocolConfig
protocol-idsjava.lang.StringId list of protocols the service will export with (use this or protocols, not both).
protocolsjava.util.List<org.apache.dubbo.config.ProtocolConfig>List of protocols the service will export with (use this or protocolIds, not both).
proxyjava.lang.StringStrategy for generating dynamic agents (options: “jdk” or “javassist”).
queuesjava.lang.IntegerThe length of the thread pool queue.
registerjava.lang.BooleanWhether to register the service.
registriesjava.util.List<org.apache.dubbo.config.RegistryConfig>Registries where the service will be registered (use this or registryIds, not both).
registryorg.apache.dubbo.config.RegistryConfig
registry-idsjava.lang.StringRegistry IDs for service registration (use this or registries, not both).
retriesjava.lang.IntegerRetry times for failed invocations.
scopejava.lang.StringService scope (“local” implies searching in the current JVM only).
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
sentjava.lang.BooleanAcknowledge asynchronous-sent invocations.
serializationjava.lang.StringSerialization type for service communication.
serverjava.lang.StringThe server-side implementation model of the protocol.
singletonjava.lang.BooleanUse separate instances for services with the same serviceKey (applies when using ReferenceConfig and SimpleReferenceCache together). Directly calling ReferenceConfig.get() will not check this attribute.
statusjava.lang.StringThe status check configuration.
stubjava.lang.StringLocal stub class name for the service interface.
tagjava.lang.StringCustom tag for the service configuration.
telnetjava.lang.StringSupported telnet commands, separated by commas.
threadnamejava.lang.StringThe name of the thread pool.
threadpooljava.lang.StringThe thread pool configuration.
threadsjava.lang.IntegerThe size of the thread pool (fixed size).
timeoutjava.lang.IntegerTimeout for remote invocation in milliseconds.
tokenjava.lang.StringWhether to use a token for authentication.
transporterjava.lang.StringThe transporter used by the protocol.
use-java-package-as-pathjava.lang.BooleanWhether to use java_package in IDL as path. Default use package. This param only available when service using native stub.
validationjava.lang.StringEnable JSR303 standard annotation validation for method parameters.
versionjava.lang.StringThe service version.
waitjava.lang.IntegerThe wait time when stopping the service.
warmupjava.lang.IntegerWarm-up period for the service.
weightjava.lang.IntegerThe service weight.

dubbo.registry

Class: org.apache.dubbo.config.RegistryConfig

KeyTypeDescriptionDefault valueDeprecation
acceptsjava.lang.StringList of RPC protocols accepted by this registry, e.g., “dubbo,rest”.
addressjava.lang.StringRegister center address.
checkjava.lang.BooleanWhether to check if the register center is available when booting up.
clientjava.lang.StringClient implementation.
clusterjava.lang.StringAffects how traffic distributes among registries, useful when subscribing to multiple registries. Available options: - “zone-aware”: A certain type of traffic always goes to one Registry according to where the traffic is originated.
defaultjava.lang.Boolean
dynamicjava.lang.BooleanWhether to allow dynamic service registration on the register center.
enable-empty-protectionjava.lang.BooleanEnable empty protection.
extra-keysjava.lang.StringAfter simplifying the registry, add some parameters individually, useful for providers. Example: extra-keys = “A, b, c, d”. @since 2.7.0
filejava.lang.StringFile for saving the register center dynamic list.
groupjava.lang.StringThe group that services registry belongs to.
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
parametersjava.util.Map<java.lang.String,java.lang.String>Customized parameters.
passwordjava.lang.StringPassword to login the register center.
portjava.lang.IntegerDefault port for the register center.
preferredjava.lang.BooleanAlways use this registry first if set to true, useful when subscribing to multiple registries.
prefixesjava.util.List<java.lang.String>
protocoljava.lang.StringProtocol used for the register center.
registerjava.lang.BooleanWhether to allow exporting service on the register center.
register-modejava.lang.StringRegister mode.
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
securejava.lang.StringSecurity settings.
serverjava.lang.StringServer implementation.
sessionjava.lang.IntegerSession timeout in milliseconds for the register center.
simplifiedjava.lang.BooleanSimplify the registry, useful for both providers and consumers. @since 2.7.0
subscribejava.lang.BooleanWhether to allow subscribing to services on the register center.
timeoutjava.lang.IntegerConnect timeout in milliseconds for the register center.
transportjava.lang.StringReason: null, use for replacement: null
transporterjava.lang.StringNetwork transmission type.
use-as-config-centerjava.lang.BooleanIndicates whether the address works as a configuration center or not.
use-as-metadata-centerjava.lang.BooleanIndicates whether the address works as a remote metadata center or not.
usernamejava.lang.StringUsername to login the register center.
versionjava.lang.StringVersion of the registry.
waitjava.lang.IntegerWait time before stopping.Reason: null, use for replacement: null
weightjava.lang.IntegerAffects traffic distribution among registries, useful when subscribing to multiple registries. Takes effect only when no preferred registry is specified.
zonejava.lang.StringThe region where the registry belongs, usually used to isolate traffics.

dubbo.rpc

Class: org.apache.dubbo.spring.boot.autoconfigure.DubboConfigurationProperties$RpcConfig

KeyTypeDescriptionDefault valueDeprecation

dubbo.ssl

Class: org.apache.dubbo.config.SslConfig

KeyTypeDescriptionDefault valueDeprecation
ca-addressjava.lang.StringAddress for Certificate Authority (CA).
ca-cert-pathjava.lang.StringPath to the CA certificate file.
client-key-cert-chain-pathjava.lang.StringPath to the client’s key certificate chain file.
client-key-cert-chain-path-streamjava.io.InputStreamInput stream for the client’s key certificate chain (if provided).
client-key-passwordjava.lang.StringPassword for the client’s private key (if applicable).
client-private-key-pathjava.lang.StringPath to the client’s private key file.
client-private-key-path-streamjava.io.InputStreamInput stream for the client’s private key (if provided).
client-trust-cert-collection-pathjava.lang.StringPath to the client’s trust certificate collection file.
client-trust-cert-collection-path-streamjava.io.InputStreamInput stream for the client’s trust certificate collection (if provided).
defaultjava.lang.Boolean
env-typejava.lang.StringEnvironment type for SSL configuration.
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
oidc-token-pathjava.lang.StringPath to the OIDC (OpenID Connect) token file.
prefixesjava.util.List<java.lang.String>
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!
server-key-cert-chain-pathjava.lang.StringPath to the server’s key certificate chain file.
server-key-cert-chain-path-streamjava.io.InputStreamInput stream for the server’s key certificate chain (if provided).
server-key-passwordjava.lang.StringPassword for the server’s private key (if applicable).
server-private-key-pathjava.lang.StringPath to the server’s private key file.
server-private-key-path-streamjava.io.InputStreamInput stream for the server’s private key (if provided).
server-trust-cert-collection-pathjava.lang.StringPath to the server’s trust certificate collection file.
server-trust-cert-collection-path-streamjava.io.InputStreamInput stream for the server’s trust certificate collection (if provided).

dubbo.tracing

Class: org.apache.dubbo.config.TracingConfig

KeyTypeDescriptionDefault valueDeprecation
defaultjava.lang.Boolean
enabledjava.lang.BooleanIndicates whether the feature is enabled (default is false).false
idjava.lang.StringIdentifier for this configuration.
meta-datajava.util.Map<java.lang.String,java.lang.String>
need-refreshjava.lang.BooleanSpecifies if this configuration should be refreshed (true for refreshing).true
prefixesjava.util.List<java.lang.String>
scope-modelorg.apache.dubbo.rpc.model.ScopeModelThe scope model of this config instance. <p> <b>NOTE:</b> the model maybe changed during config processing, the extension spi instance needs to be reinitialized after changing the model!

dubbo.metrics.aggregation

Class: org.apache.dubbo.config.nested.AggregationConfig

KeyTypeDescriptionDefault valueDeprecation
bucket-numjava.lang.IntegerThe number of buckets for time window quantile.
enable-qpsjava.lang.BooleanEnable QPS (Queries Per Second) aggregation or not.
enable-requestjava.lang.BooleanEnable Request aggregation or not.
enable-rtjava.lang.BooleanEnable Response Time aggregation or not.
enable-rt-pxxjava.lang.BooleanEnable Response Time Percentile (Pxx) aggregation or not.
enabledjava.lang.BooleanEnable aggregation or not.
qps-time-window-mill-secondsjava.lang.IntegerThe time window in milliseconds for QPS (Queries Per Second) aggregation.
time-window-secondsjava.lang.IntegerThe time window in seconds for time window quantile.

dubbo.metrics.histogram

Class: org.apache.dubbo.config.nested.HistogramConfig

KeyTypeDescriptionDefault valueDeprecation
buckets-msjava.lang.Integer[]Buckets in milliseconds for the histograms. Defines the histogram bucket boundaries.
distribution-statistic-expiry-minjava.lang.IntegerExpiry time in minutes for distribution statistics. After this time, the statistics are expired.
enabledjava.lang.BooleanWhether histograms are enabled or not. Default is not enabled (false).
enabled-percentilesjava.lang.BooleanWhether enabledPercentiles are enabled or not. Default is not enabled (false).
max-expected-msjava.lang.IntegerMaximum expected value in milliseconds for the histograms. Values higher than this will be considered outliers.
min-expected-msjava.lang.IntegerMinimum expected value in milliseconds for the histograms. Values lower than this will be considered outliers.
percentilesjava.lang.Double[]Array of percentiles to be calculated for the histograms. Each percentile is a double value.

dubbo.metrics.prometheus

Class: org.apache.dubbo.config.nested.PrometheusConfig

KeyTypeDescriptionDefault valueDeprecation

method

方法级配置。

对应的配置类: org.apache.dubbo.config.MethodConfig。同时该标签为 servicereference 的子标签,用于控制到方法级。

比如:

  1. <dubbo:reference interface="com.xxx.XxxService">
  2. <dubbo:method name="findXxx" timeout="3000" retries="2" />
  3. </dubbo:reference>
属性对应URL参数类型是否必填缺省值作用描述兼容性
namestring必填标识方法名1.0.8以上版本
timeout<methodName>.timeoutint可选缺省为的timeout性能调优方法调用超时时间(毫秒)1.0.8以上版本
retries<methodName>.retriesint可选缺省为<dubbo:reference>的retries性能调优远程服务调用重试次数,不包括第一次调用,不需要重试请设为02.0.0以上版本
loadbalance<methodName>.loadbalancestring可选缺省为的loadbalance性能调优负载均衡策略,可选值:

random - 随机;

roundrobin - 轮询;

leastactive - 最少活跃调用;

consistenthash - 哈希一致 (2.1.0以上版本);

* shortestresponse - 最短响应 (2.7.7以上版本);
2.0.0以上版本
async<methodName>.asyncboolean可选缺省为<dubbo:reference>的async性能调优是否异步执行,不可靠异步,只是忽略返回值,不阻塞执行线程1.0.9以上版本
sent<methodName>.sentboolean可选true性能调优异步调用时,标记sent=true时,表示网络已发出数据2.0.6以上版本
actives<methodName>.activesint可选0性能调优每服务消费者最大并发调用限制2.0.5以上版本
executes<methodName>.executesint可选0性能调优每服务每方法最大使用线程数限制- -,此属性只在<dubbo:method>作为<dubbo:service>子标签时有效2.0.5以上版本
deprecated<methodName>.deprecatedboolean可选false服务治理服务方法是否过时,此属性只在<dubbo:method>作为<dubbo:service>子标签时有效2.0.5以上版本
sticky<methodName>.stickyboolean可选false服务治理设置true 该接口上的所有方法使用同一个provider.如果需要更复杂的规则,请使用路由2.0.6以上版本
return<methodName>.returnboolean可选true性能调优方法调用是否需要返回值,async设置为true时才生效,如果设置为true,则返回future,或回调onreturn等方法,如果设置为false,则请求发送成功后直接返回Null2.0.6以上版本
oninvokeattribute属性,不在URL中体现String可选性能调优实例执行前拦截2.0.6以上版本
onreturnattribute属性,不在URL中体现String可选性能调优实例执行返回后拦截2.0.6以上版本
onthrowattribute属性,不在URL中体现String可选性能调优实例执行有异常拦截2.0.6以上版本
oninvokeMethodattribute属性,不在URL中体现String可选性能调优方法执行前拦截2.0.6以上版本
onreturnMethodattribute属性,不在URL中体现String可选性能调优方法执行返回后拦截2.0.6以上版本
onthrowMethodattribute属性,不在URL中体现String可选性能调优方法执行有异常拦截2.0.6以上版本
cache<methodName>.cachestring/boolean可选服务治理以调用参数为key,缓存返回结果,可选:lru, threadlocal, jcache等2.1.0以上版本
validation<methodName>.validationboolean可选服务治理是否启用JSR303标准注解验证,如果启用,将对方法参数上的注解进行校验2.1.0以上版本

argument

方法参数配置。

对应的配置类: org.apache.dubbo.config.ArgumentConfig。该标签为 method 的子标签,用于方法参数的特征描述,比如 XML 格式:

  1. <dubbo:method name="findXxx" timeout="3000" retries="2">
  2. <dubbo:argument index="0" callback="true" />
  3. </dubbo:method>
属性对应URL参数类型是否必填缺省值作用描述兼容性
indexint必填标识参数索引2.0.6以上版本
typeString与index二选一标识通过参数类型查找参数的index2.0.6以上版本
callback<metodName><index>.callbackboolean可选服务治理参数是否为callback接口,如果为callback,服务提供方将生成反向代理,可以从服务提供方反向调用消费方,通常用于事件推送.2.0.6以上版本

parameter

选项参数配置。

对应的配置类:java.util.Map。同时该标签为 protocolserviceproviderreferenceconsumermonitorregistrymetadata-configconfig-center 的子标签,用于配置自定义参数,该配置项将作为扩展点设置自定义参数使用。

比如:

  1. <dubbo:protocol name="napoli">
  2. <dubbo:parameter key="http://10.20.160.198/wiki/display/dubbo/napoli.queue.name" value="xxx" />
  3. </dubbo:protocol>

或:

  1. <dubbo:protocol name="jms" p:queue="xxx" />
属性对应URL参数类型是否必填缺省值作用描述兼容性
keykeystring必填服务治理路由参数键2.0.0以上版本
valuevaluestring必填服务治理路由参数值2.0.0以上版本

最后修改 September 13, 2024: Refactor website structure (#2860) (1a4b998f54b)