- 配置项手册
- 配置项参考手册
- JVM(-D) 参数
- 环境变量
- 配置项手册
- dubbo.tracing.baggage.correlation
- dubbo.tracing.tracing-exporter.otlp-config
- dubbo.tracing.tracing-exporter.zipkin-config
- dubbo.metrics.prometheus.exporter
- dubbo.metrics.prometheus.pushgateway
- Unknown group
- dubbo.tracing.baggage
- dubbo.tracing.propagation
- dubbo.tracing.sampling
- dubbo.tracing.tracing-exporter
- dubbo.rpc.tri
- dubbo
- dubbo.application
- dubbo.config-center
- dubbo.consumer
- dubbo.metadata-report
- dubbo.metrics
- dubbo.module
- dubbo.monitor
- dubbo.protocol
- dubbo.provider
配置项手册
配置项参考手册
包含 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.imagecode| | <https://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=20| Dubbo 支持自动打印调用堆栈,这个参数可以控制堆栈行数,如示例中只会打印前20行堆栈
dubbo.json-framework.prefer| -Ddubbo.json-framework.prefer=gson| 设置框架中 json 序列化的具体实现,目前可选实现有 fastjson2、fastjson、gson、jackson。默认情况,框架会自动查找可用实现,以上按顺序优先级依次降低
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
env| | Apollo 配置中心特有参数
app.id| | Apollo 配置中心特有参数
apollo.cluster| | Apollo 配置中心特有参数
apollo.meta| | Apollo 配置中心特有参数
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_SERIALIZATION| DUBBO_DEFAULT_SERIALIZATION=“hessan2”| 设置框架的默认序列化方式,如hessian2、fastjson2、msgpack等
DUBBO2_COMPACT_ENABLE| DUBBO2_COMPAT_ENABLE=“true”|
DUBBO_ENV_KEYS| DUBBO_LABELS=“tag1=value1; tag2=value2”| tag1=value1会作为附加参数上报到地址 URL,作为系统环境变量可用于为实例打标等。
DUBBO_LABELS| DUBBO_ENV_KEYS=“DUBBO_TAG1, DUBBO_TAG2”| Dubbo 会读取 DUBBO_TAG1、DUBBO_TAG2两个环境变量,并将读取的值 value DUBBO_TAG1=value 作为附加参数上报到地址 URL。
POD_NAMESPACE| | 用于 Kubernetes Service 场景,指定命名空间
CLUSTER_DOMAIN| | 用于 Kubernetes Service 场景,指定集群名称,默认 default
DUBBO_IP_TO_REGISTRY| DUBBO_IP_TO_REGISTRY=30.123.45.187| 指定注册到注册中心 URL 中的 ip 地址
DUBBO_PORT_TO_REGISTRY| DUBBO_PORT_TO_REGISTRY=20880| 指定注册到注册中心 URL 中的 port 端口号
DUBBO{PROTOCOL}PORT_TO_REGISTRY| DUBBO_DUBBO_IP_TO_REGISTRY=30.123.45.187
DUBBO_TRI_IP_TO_REGISTRY=30.123.45.187| 指定注册到注册中心 URL 中的 ip 地址,可以为不同协议指定不同 ip
DUBBO{PROTOCOL}PORT_TO_REGISTRY| DUBBO_DUBBO_PORT_TO_REGISTRY=20880
DUBBO_TRI_PORT_TO_REGISTRY=50051| 指定注册到注册中心 URL 中的 port 端口,可以为不同协议指定不同 port
DUBBO_IP_TO_BIND| DUBBO_IP_TO_BIND=30.123.45.187| 指定 tcp 监听绑定的 ip 地址
DUBBO_PORT_TO_BIND| DUBBO_PORT_TO_BIND=20880| 指定 tcp 监听绑定的 port 端口
DUBBO{PROTOCOL}IP_TO_BIND| DUBBO_DUBBO_IP_TO_BIND=30.123.45.187
DUBBO_TRI_IP_TO_BIND=30.123.45.187| 指定 tcp 监听绑定的 ip 地址,可以为不同协议指定不同 ip
DUBBO{PROTOCOL}_PORT_TO_BIND| DUBBO_DUBBO_PORT_TO_BIND=20880
DUBBO_TRI_PORT_TO_BIND=50051| 指定 tcp 监听绑定的 port 端口,可以为不同协议指定不同 port
dubbo.properties.file| dubbo.properties.file=foo.properties| 指定 properties 配置文件地址,可以是绝对路径或者classpath相对路径。默认值为 dubbo.properties
dubbo.migration.file| dubbo.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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| enabled | java.lang.Boolean | Whether to enable correlation of the baggage context with logging contexts. | true | |
| fields | java.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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| compression-method | java.lang.String | The method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include “gzip” and “none”. | none | |
| endpoint | java.lang.String | URL to the Otlp API. | ||
| headers | java.util.Map<java.lang.String,java.lang.String> | |||
| timeout | java.time.Duration | The 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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| connect-timeout | java.time.Duration | Connection timeout for requests to Zipkin. (seconds) | 1 | |
| endpoint | java.lang.String | URL to the Zipkin API. | ||
| read-timeout | java.time.Duration | Read timeout for requests to Zipkin. (seconds) | 10 |
dubbo.metrics.prometheus.exporter
Class: org.apache.dubbo.config.nested.PrometheusConfig$Exporter
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| enable-http-service-discovery | java.lang.Boolean | Enable http service discovery for prometheus | ||
| enabled | java.lang.Boolean | Enable prometheus exporter | ||
| http-service-discovery-url | java.lang.String | Http service discovery url |
dubbo.metrics.prometheus.pushgateway
Class: org.apache.dubbo.config.nested.PrometheusConfig$Pushgateway
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| base-url | java.lang.String | Base URL for the Pushgateway | ||
| enabled | java.lang.Boolean | Enable publishing via a Prometheus Pushgateway | ||
| job | java.lang.String | Job identifier for this application instance | ||
| password | java.lang.String | Login password of the Prometheus Pushgateway | ||
| push-interval | java.lang.Integer | Frequency with which to push metrics | ||
| username | java.lang.String | Login user of the Prometheus Pushgateway |
Unknown group
Class: Unknown
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| dubbo.config-center.include-spring-env | java.lang.Boolean | Whether to include Spring Environment. | ||
| dubbo.config.mode | org.apache.dubbo.config.context.ConfigMode | Config processing mode. See <code>org.apache.dubbo.config.context.ConfigMode</code>. | ||
| dubbo.config.multiple | java.lang.Boolean | Whether to enable multiple configurations in Dubbo, allowing multiple configurations to be loaded and used, default value is <code>true</code>. | ||
| dubbo.config.override | java.lang.Boolean | Whether to allow configuration override in Dubbo, default value is <code>true</code>. | ||
| dubbo.enabled | java.util.Set<java.lang.String> | Whether enable autoconfiguration of dubbo, default value is <code>true</code>. | ||
| dubbo.env.keys | java.lang.String | The 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.labels | java.lang.String | The labels for these service providers, enabling categorization and grouping, thereby enhancing their management and monitoring, the multiple-value is delimited by ‘;’. | ||
| dubbo.scan.base-packages | java.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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| enabled | java.lang.Boolean | Whether baggage is enabled or not. | true | |
| remote-fields | java.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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| type | java.lang.String | Tracing context propagation type. | W3C |
dubbo.tracing.sampling
Class: org.apache.dubbo.config.nested.SamplingConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| probability | java.lang.Float | Probability 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
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
dubbo.rpc.tri
Class: org.apache.dubbo.config.TripleConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| enable-push | java.lang.Boolean | Whether to enable push, default is false. | ||
| header-table-size | java.lang.String | The header table size. | ||
| initial-window-size | java.lang.String | Initial window size. | ||
| max-concurrent-streams | java.lang.String | Maximum concurrent streams. | ||
| max-frame-size | java.lang.String | Maximum frame size. | ||
| max-header-list-size | java.lang.String | Maximum header list size. |
dubbo
Class: org.apache.dubbo.spring.boot.autoconfigure.DubboConfigurationProperties
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| config-centers | java.util.Map<java.lang.String,org.apache.dubbo.config.ConfigCenterConfig> | Multiple configurations for ConfigCenterBean. | ||
| consumers | java.util.Map<java.lang.String,org.apache.dubbo.config.ConsumerConfig> | Multiple configurations for Consumer. | ||
| metadata-reports | java.util.Map<java.lang.String,org.apache.dubbo.config.MetadataReportConfig> | Multiple configurations for MetadataReportConfig. | ||
| metricses | java.util.Map<java.lang.String,org.apache.dubbo.config.MetricsConfig> | Multiple configurations for MetricsConfig. | ||
| modules | java.util.Map<java.lang.String,org.apache.dubbo.config.ModuleConfig> | Multiple configurations for Module. | ||
| monitors | java.util.Map<java.lang.String,org.apache.dubbo.config.MonitorConfig> | Multiple configurations for Monitor. | ||
| protocols | java.util.Map<java.lang.String,org.apache.dubbo.config.ProtocolConfig> | Multiple configurations for Protocol. | ||
| providers | java.util.Map<java.lang.String,org.apache.dubbo.config.ProviderConfig> | Multiple configurations for Provider. | ||
| registries | java.util.Map<java.lang.String,org.apache.dubbo.config.RegistryConfig> | Multiple configurations for Registry. | ||
| tracings | java.util.Map<java.lang.String,org.apache.dubbo.config.TracingConfig> | Multiple configurations for TracingConfig. |
dubbo.application
Class: org.apache.dubbo.config.ApplicationConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| architecture | java.lang.String | Architecture layer. | ||
| auto-trust-serialize-class | java.lang.Boolean | Whether to automatically trust serialized classes. | ||
| check-serializable | java.lang.Boolean | Whether to check serializable. | ||
| compiler | java.lang.String | Java compiler. | ||
| default | java.lang.Boolean | |||
| dump-directory | java.lang.String | Directory for saving thread dump. | ||
| dump-enable | java.lang.Boolean | Whether to enable saving thread dump or not. | ||
| enable-empty-protection | java.lang.Boolean | Whether to enable protection against empty objects. | ||
| enable-file-cache | java.lang.Boolean | Whether to enable file caching. | ||
| environment | java.lang.String | Environment, e.g., dev, test, or production. | ||
| executor-management-mode | java.lang.String | Thread pool management mode: ‘default’ or ‘isolation’. | ||
| id | java.lang.String | Identifier for this configuration. | ||
| liveness-probe | java.lang.String | Used to set extensions of the probe in QoS. | ||
| logger | java.lang.String | The type of log access. | ||
| mapping-retry-interval | java.lang.Integer | The retry interval of service name mapping. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| metadata-service-port | java.lang.Integer | Metadata Service, used in Service Discovery. | ||
| metadata-service-protocol | java.lang.String | The protocol used for peer-to-peer metadata transmission. | ||
| metadata-type | java.lang.String | Metadata type, local or remote. If ‘remote’ is chosen, you need to specify a metadata center further. | ||
| monitor | org.apache.dubbo.config.MonitorConfig | Monitor center. | ||
| name | java.lang.String | The Application name. | ||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| organization | java.lang.String | The application’s organization (BU). | ||
| owner | java.lang.String | The application owner. | ||
| parameters | java.util.Map<java.lang.String,java.lang.String> | Customized parameters. | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | The preferred protocol (name) of this application, convenient for places where it’s hard to determine the preferred protocol. | ||
| qos-accept-foreign-ip | java.lang.Boolean | Should we accept foreign IP or not? | ||
| qos-accept-foreign-ip-compatible | java.lang.Boolean | |||
| qos-accept-foreign-ip-whitelist | java.lang.String | When we disable accepting foreign IP, support specifying foreign IPs in the whitelist. | ||
| qos-accept-foreign-ip-whitelist-compatible | java.lang.String | |||
| qos-anonymous-access-permission-level | java.lang.String | The anonymous (any foreign IP) access permission level, default is NONE, which means no access to any command. | ||
| qos-anonymous-access-permission-level-compatible | java.lang.String | |||
| qos-anonymous-allow-commands | java.lang.String | The anonymous (any foreign IP) allowed commands, default is empty, which means no access to any command. | ||
| qos-check | java.lang.Boolean | Whether QoS should start successfully or not, will check qosEnable first. | ||
| qos-enable | java.lang.Boolean | Whether to enable Quality of Service (QoS) or not. | ||
| qos-enable-compatible | java.lang.Boolean | |||
| qos-host | java.lang.String | The QoS host to listen. | ||
| qos-host-compatible | java.lang.String | |||
| qos-port | java.lang.Integer | The QoS port to listen. | ||
| qos-port-compatible | java.lang.Integer | |||
| readiness-probe | java.lang.String | The probe for checking the readiness of the application. | ||
| register-consumer | java.lang.Boolean | Used to control whether to register the instance with the registry or not. Set to ‘false’ only when the instance is a pure consumer. | ||
| register-mode | java.lang.String | Register mode. | ||
| registries | java.util.List<org.apache.dubbo.config.RegistryConfig> | Registry centers. | ||
| registry | org.apache.dubbo.config.RegistryConfig | |||
| registry-ids | java.lang.String | The comma-separated list of registry IDs to which the service will be registered. | ||
| repository | java.lang.String | Repository. | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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-status | java.lang.String | The status of class serialization checking. | ||
| shutwait | java.lang.String | Config the shutdown wait. | ||
| startup-probe | java.lang.String | The probe for checking the startup of the application. | ||
| trust-serialize-class-level | java.lang.Integer | The trust level for serialized classes. | ||
| version | java.lang.String | The application version. |
dubbo.config-center
Class: org.apache.dubbo.config.ConfigCenterConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| address | java.lang.String | The address (URL or hostname) of the config center server. | ||
| app-config-file | java.lang.String | The properties file under ‘configFile’ is global shared, while ‘.properties’ under this one is limited only to this application. | ||
| app-external-configuration | java.util.Map<java.lang.String,java.lang.String> | Application-specific external configuration for the config center. | ||
| check | java.lang.Boolean | Behavior when the initial connection attempt to the config center fails. ‘true’ means interrupt the whole process once a failure occurs. Default value is true. | ||
| cluster | java.lang.String | The config center cluster, its actual meaning may vary depending on the specific config center product. | ||
| config-file | java.lang.String | Key mapping for properties files. Most of the time, you do not need to change this parameter. Default value is CommonConstants.DEFAULT_DUBBO_PROPERTIES. | ||
| default | java.lang.Boolean | |||
| external-configuration | java.util.Map<java.lang.String,java.lang.String> | External configuration for the config center. | ||
| group | java.lang.String | The 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-priority | java.lang.Boolean | If 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 | |
| id | java.lang.String | Identifier for this configuration. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| namespace | java.lang.String | The 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-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| parameters | java.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> | ||
| password | java.lang.String | Password for authentication with the config center. | ||
| port | java.lang.Integer | The port number for the config center server. | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | The protocol used for accessing the config center. | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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! | ||
| timeout | java.lang.Long | The timeout for accessing the config center. Default value is 30000L. | ||
| username | java.lang.String | Username for authentication with the config center. |
dubbo.consumer
Class: org.apache.dubbo.config.ConsumerConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| actives | java.lang.Integer | Maximum concurrent invocations allowed. | ||
| application | org.apache.dubbo.config.ApplicationConfig | Application configuration for the service. | Reason: null, use for replacement: null | |
| async | java.lang.Boolean | Enable asynchronous invocation. Note that it is unreliable asynchronous, ignoring return values and not blocking threads. | ||
| auth | java.lang.Boolean | Enable service authentication. | ||
| cache | java.lang.String | Cache provider for caching return results. available options: lru, threadlocal, jcache etc. | ||
| callbacks | java.lang.Integer | Callback limits for the service. | ||
| check | java.lang.Boolean | Check if service provider exists, if not exists, it will be fast fail | ||
| client | java.lang.String | client type | ||
| cluster | java.lang.String | Cluster type for service. | ||
| config-center | org.apache.dubbo.config.ConfigCenterConfig | Configuration center settings. | Reason: null, use for replacement: null | |
| connections | java.lang.Integer | Connection limits: 0 for shared connection, otherwise specifying connections for the service. | ||
| corethreads | java.lang.Integer | Consumer threadpool core thread size | ||
| default | java.lang.Boolean | |||
| exported-urls | java.util.List<org.apache.dubbo.common.URL> | |||
| filter | java.lang.String | Filters for service exposure or reference (multiple filters can be separated by commas). | ||
| forks | java.lang.Integer | Forks for forking cluster. | ||
| generic | java.lang.String | Whether to use generic interface | ||
| group | java.lang.String | Group of the remote service referenced by the consumer/provider. | ||
| id | java.lang.String | Identifier for this configuration. | ||
| init | java.lang.Boolean | Whether to eagle-init | ||
| injvm | java.lang.Boolean | Whether to find reference’s instance from the current JVM | Reason: null, use for replacement: null | |
| interface | java.lang.String | |||
| layer | java.lang.String | Layer of service providers. | ||
| lazy | java.lang.Boolean | Lazy create connection | ||
| listener | java.lang.String | Listeners for service exposure or reference (multiple listeners can be separated by commas). | ||
| loadbalance | java.lang.String | Load balancing strategy for service invocation. | ||
| local | java.lang.String | Local implementation class name for the service interface. | Reason: null, use for replacement: null | |
| merger | java.lang.String | Merger for result data. | ||
| mesh-enable | java.lang.Boolean | enable mesh mode @since 3.1.0 | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| metadata-report-config | org.apache.dubbo.config.MetadataReportConfig | Metadata report configuration. | Reason: null, use for replacement: null | |
| methods | java.util.List<org.apache.dubbo.config.MethodConfig> | Method-specific configuration. | ||
| mock | java.lang.String | Mock 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. | ||
| module | org.apache.dubbo.config.ModuleConfig | Module configuration for the service. | Reason: null, use for replacement: null | |
| monitor | org.apache.dubbo.config.MonitorConfig | Service monitoring configuration. | Reason: null, use for replacement: null | |
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| onconnect | java.lang.String | Event handler for connection establishment. | ||
| ondisconnect | java.lang.String | Event handler for disconnection. | ||
| owner | java.lang.String | Owner of the service providers. | ||
| parameters | java.util.Map<java.lang.String,java.lang.String> | Customized parameters for configuration. | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | Only the service provider of the specified protocol is invoked, and other protocols are ignored. | ||
| provided-by | java.lang.String | declares which app or service this interface belongs to | ||
| provider-namespace | java.lang.String | assign the namespace that provider belong to @since 3.1.1 | ||
| provider-port | java.lang.Integer | By 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 | ||
| proxy | java.lang.String | Strategy for generating dynamic agents (options: “jdk” or “javassist”). | ||
| queues | java.lang.Integer | Consumer threadpool queue size | ||
| reconnect | java.lang.String | |||
| refer-async | java.lang.Boolean | Weather the reference is referred asynchronously @see ModuleConfig#referAsync @deprecated | Reason: null, use for replacement: null | |
| refer-background | java.lang.Boolean | Whether 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-num | java.lang.Integer | Thread num for asynchronous refer pool size | ||
| registries | java.util.List<org.apache.dubbo.config.RegistryConfig> | Registries where the service will be registered (use this or registryIds, not both). | ||
| registry | org.apache.dubbo.config.RegistryConfig | |||
| registry-ids | java.lang.String | Registry IDs for service registration (use this or registries, not both). | ||
| retries | java.lang.Integer | Retry times for failed invocations. | ||
| router | java.lang.String | |||
| scope | java.lang.String | Service scope (“local” implies searching in the current JVM only). | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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! | ||
| sent | java.lang.Boolean | Acknowledge asynchronous-sent invocations. | ||
| shareconnections | java.lang.Integer | By 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. | ||
| singleton | java.lang.Boolean | Use separate instances for services with the same serviceKey (applies when using ReferenceConfig and SimpleReferenceCache together). Directly calling ReferenceConfig.get() will not check this attribute. | ||
| sticky | java.lang.Boolean | |||
| stub | java.lang.String | Local stub class name for the service interface. | ||
| tag | java.lang.String | Custom tag for the service configuration. | ||
| threadpool | java.lang.String | Consumer thread pool type: cached, fixed, limit, eager | ||
| threads | java.lang.Integer | Consumer threadpool thread size | ||
| timeout | java.lang.Integer | Timeout for remote invocation in milliseconds. | ||
| url-merge-processor | java.lang.String | Url Merge Processor Used to customize the URL merge of consumer and provider | ||
| validation | java.lang.String | Enable JSR303 standard annotation validation for method parameters. | ||
| version | java.lang.String | Version of the remote service referenced by the consumer/provider. |
dubbo.metadata-report
Class: org.apache.dubbo.config.MetadataReportConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| address | java.lang.String | The address of the metadata center. | ||
| check | java.lang.Boolean | Decide the behavior when the initial connection attempt fails, where ‘true’ means interrupt the whole process once it fails. The default value is true. | ||
| cluster | java.lang.Boolean | Whether to use a cluster configuration for the metadata center. | ||
| cycle-report | java.lang.Boolean | By default, the metadata store will store full metadata repeatedly every day. | ||
| default | java.lang.Boolean | |||
| file | java.lang.String | The file path for saving the metadata center’s dynamic list. | ||
| group | java.lang.String | The group for the metadata center, which is similar to the registry group. | ||
| id | java.lang.String | Identifier for this configuration. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| parameters | java.util.Map<java.lang.String,java.lang.String> | Customized parameters for the metadata center. | ||
| password | java.lang.String | The password used to log in to the metadata center. | ||
| port | java.lang.Integer | The default port for the metadata center. | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | The protocol for the metadata center. | ||
| registry | java.lang.String | The registry ID for the metadata center. | ||
| report-definition | java.lang.Boolean | Whether to report definition. | ||
| report-metadata | java.lang.Boolean | Whether to report metadata. | ||
| retry-period | java.lang.Integer | The retry period in milliseconds when connecting to the metadata center. | ||
| retry-times | java.lang.Integer | The number of retry times when connecting to the metadata center. | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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-report | java.lang.Boolean | Synchronization report, with the default value as asynchronous. | ||
| timeout | java.lang.Integer | The request timeout in milliseconds for the metadata center. | ||
| username | java.lang.String | The username used to log in to the metadata center. |
dubbo.metrics
Class: org.apache.dubbo.config.MetricsConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| collector-sync-period | java.lang.Integer | Collector synchronization period. | ||
| default | java.lang.Boolean | |||
| enable-collector-sync | java.lang.Boolean | Whether to enable collector synchronization. | ||
| enable-jvm | java.lang.Boolean | Whether to enable JVM metrics collection. | ||
| enable-metadata | java.lang.Boolean | Whether to enable metadata metrics collection. | ||
| enable-metrics-init | java.lang.Boolean | Whether to enable metrics initialization. | ||
| enable-netty | java.lang.Boolean | Whether to enable Netty metrics collection. | ||
| enable-registry | java.lang.Boolean | Whether to enable registry metrics collection. | ||
| enable-rpc | java.lang.Boolean | Whether to enable RPC (Remote Procedure Call) metrics collection. | ||
| enable-threadpool | java.lang.Boolean | Whether to enable thread pool metrics collection. | ||
| export-metrics-service | java.lang.Boolean | Whether to export metrics service. | ||
| export-service-port | java.lang.Integer | Port used for exporting metrics services. | ||
| export-service-protocol | java.lang.String | Protocol used for metrics collection and export. | ||
| id | java.lang.String | Identifier for this configuration. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| port | java.lang.String | Deprecated: This parameter should no longer be used and will be removed in the future. | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | Protocol used for metrics. | ||
| rpc-level | java.lang.String | The level of metrics collection, which can be “SERVICE” or “METHOD”. The default is “METHOD”. | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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-registry | java.lang.Boolean | Decide whether to use the global registry of Micrometer. |
dubbo.module
Class: org.apache.dubbo.config.ModuleConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| background | java.lang.Boolean | Whether 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-timeout | java.lang.Long | The timeout to check references. | ||
| default | java.lang.Boolean | |||
| export-async | java.lang.Boolean | Whether the service is exported asynchronously. | ||
| export-thread-num | java.lang.Integer | The thread number for asynchronous export pool size. | ||
| id | java.lang.String | Identifier for this configuration. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| monitor | org.apache.dubbo.config.MonitorConfig | Monitor center | ||
| name | java.lang.String | The module name | ||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| organization | java.lang.String | The module’s organization | ||
| owner | java.lang.String | The module owner | ||
| prefixes | java.util.List<java.lang.String> | |||
| refer-async | java.lang.Boolean | Whether the reference is referred asynchronously. | ||
| refer-thread-num | java.lang.Integer | The thread number for asynchronous reference pool size. | ||
| registries | java.util.List<org.apache.dubbo.config.RegistryConfig> | Registry centers | ||
| registry | org.apache.dubbo.config.RegistryConfig | |||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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! | ||
| version | java.lang.String | The module version |
dubbo.monitor
Class: org.apache.dubbo.config.MonitorConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| address | java.lang.String | The monitor address | ||
| default | java.lang.Boolean | |||
| group | java.lang.String | The monitor group | ||
| id | java.lang.String | Identifier for this configuration. | ||
| interval | java.lang.String | The monitor reporting interval | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| parameters | java.util.Map<java.lang.String,java.lang.String> | Customized parameters | ||
| password | java.lang.String | The monitor password | ||
| prefixes | java.util.List<java.lang.String> | |||
| protocol | java.lang.String | The 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-model | org.apache.dubbo.rpc.model.ScopeModel | The 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! | ||
| username | java.lang.String | The monitor username | ||
| version | java.lang.String | The monitor version |
dubbo.protocol
Class: org.apache.dubbo.config.ProtocolConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| accepts | java.lang.Integer | The maximum acceptable connections. | ||
| accesslog | java.lang.String | The access log configuration. | ||
| alive | java.lang.Integer | The keep-alive time for threads in the thread pool (default unit is TimeUnit.MILLISECONDS). | ||
| buffer | java.lang.Integer | The buffer size. | ||
| charset | java.lang.String | The character set used for communication. | ||
| client | java.lang.String | The client implementation. | ||
| codec | java.lang.String | The protocol codec. | ||
| contextpath | java.lang.String | The context path for the service. | ||
| corethreads | java.lang.Integer | The core thread size of the thread pool. | ||
| default | java.lang.Boolean | |||
| dispatcher | java.lang.String | The thread dispatch mode. | ||
| dispather | java.lang.String | Reason: null, use for replacement: null | ||
| exchanger | java.lang.String | The method of information exchange. | ||
| ext-protocol | java.lang.String | Extra protocol for this service, using Port Unification Server. | ||
| extension | java.lang.String | Additional extensions. | ||
| heartbeat | java.lang.Integer | The interval for sending heartbeats. | ||
| host | java.lang.String | The service’s IP address (useful when there are multiple network cards available). | ||
| id | java.lang.String | Identifier for this configuration. | ||
| iothreads | java.lang.Integer | The fixed size of the IO thread pool. | ||
| json-check-level | java.lang.String | JSON check level for serialization. | ||
| keep-alive | java.lang.Boolean | Indicates whether it is a persistent connection. | ||
| meta-data | java.util.Map<java.lang.String,java.lang.String> | |||
| name | java.lang.String | The name of the protocol. | ||
| need-refresh | java.lang.Boolean | Specifies if this configuration should be refreshed (true for refreshing). | true | |
| networker | java.lang.String | The networker implementation. | ||
| optimizer | java.lang.String | The optimizer used for dubbo protocol. | ||
| parameters | java.util.Map<java.lang.String,java.lang.String> | Custom parameters. | ||
| path | java.lang.String | Reason: null, use for replacement: null | ||
| payload | java.lang.Integer | The maximum payload length. | ||
| port | java.lang.Integer | The service’s port number. | ||
| prefer-serialization | java.lang.String | Specifies 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”. | ||
| prefixes | java.util.List<java.lang.String> | |||
| prompt | java.lang.String | The command line prompt. | ||
| queues | java.lang.Integer | The length of the thread pool’s queue. | ||
| register | java.lang.Boolean | Indicates whether the service should be registered. | ||
| scope-model | org.apache.dubbo.rpc.model.ScopeModel | The 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! | ||
| serialization | java.lang.String | The serialization method. | ||
| server | java.lang.String | The server implementation. | ||
| ssl-enabled | java.lang.Boolean | Indicates whether SSL is enabled. | ||
| status | java.lang.String | The status check configuration. | ||
| telnet | java.lang.String | Supported Telnet commands, separated by commas. | ||
| thread-pool-exhausted-listeners | java.lang.String | Listeners for exhausted thread pool. | ||
| threadpool | java.lang.String | The name of the thread pool. | ||
| threads | java.lang.Integer | The fixed size of the thread pool. | ||
| transporter | java.lang.String | The transporter used for communication. |
dubbo.provider
Class: org.apache.dubbo.config.ProviderConfig
| Key | Type | Description | Default value | Deprecation |
|---|---|---|---|---|
| accepts | java.lang.Integer | The maximum number of acceptable connections. | ||
| accesslog | java.lang.String | Whether to export access logs to logs. | ||
| actives | java.lang.Integer | Maximum concurrent invocations allowed. | ||
| alive | java.lang.Integer | The keep-alive time of the thread pool, default unit: TimeUnit.MILLISECONDS. | ||
| application | org.apache.dubbo.config.ApplicationConfig | Application configuration for the service. | Reason: null, use for replacement: null | |
| async | java.lang.Boolean | Enable asynchronous invocation. Note that it is unreliable asynchronous, ignoring return values and not blocking threads. | ||
| auth | java.lang.Boolean | Enable service authentication. | ||
| buffer | java.lang.Integer | The size of the network I/O buffer. | ||
| cache | java.lang.String | Cache provider for caching return results. available options: lru, threadlocal, jcache etc. | ||
| callbacks | java.lang.Integer | Callback limits for the service. | ||
| charset | java.lang.String | The charset used for serialization. | ||
| client | java.lang.String | The client-side implementation model of the protocol. | ||
| cluster | java.lang.String | Cluster type for service. | ||
| codec | java.lang.String | The codec used by the protocol. | ||
| config-center | org.apache.dubbo.config.ConfigCenterConfig | Configuration center settings. | Reason: null, use for replacement: null | |
| connections | java.lang.Integer | Connection limits: 0 for shared connection, otherwise specifying connections for the service. | ||
| contextpath | java.lang.String | The context path of the service. | ||
| default | java.lang.Boolean | |||
| delay | java.lang.Integer | The time delay to register the service (in milliseconds). | ||
| deprecated | java.lang.Boolean | Whether the service is deprecated. | ||
| dispatcher | java.lang.String | The mode of thread dispatching. | ||
| dispather | java.lang.String | Reason: null, use for replacement: null | ||
| document | java.lang.String | Document center for the service. | ||
| dynamic | java.lang.Boolean | Whether 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. | ||
| exchanger | java.lang.String | The method of information exchange. | ||
| executes | java.lang.Integer | Max allowed executing times. | ||
| executor | java.util.concurrent.Executor | used for thread pool isolation between services | ||
| export | java.lang.Boolean | Whether to export the service. | ||
| export-async | java.lang.Boolean | Weather the service is export asynchronously @deprecated @see ModuleConfig#exportAsync | Reason: null, use for replacement: null | |
| export-background | java.lang.Boolean | Whether 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-num | java.lang.Integer | The number of threads for the asynchronous export pool. | Reason: null, use for replacement: null | |
| exported-urls | java.util.List<org.apache.dubbo.common.URL> | |||
| filter | java.lang.String | Filters for service exposure or reference (multiple filters can be separated by commas). | ||
| forks | java.lang.Integer | Forks for forking cluster. | ||
| group | java.lang.String | The service group. | ||
| host | java.lang.String | The IP addresses of the service (used when there are multiple network cards available). | ||
| id | java.lang.String | Identifier for this configuration. | ||
| interface | jav |
(本文超出站点单文档体积上限,已截断)
