What’s New in dubbo-go v1.5.6? Key Features and Improvements Explained
The dubbo-go v1.5.6 release aligns with Dubbo 2.7.8 and introduces a CLI tool, proxy extensions, configurable file paths, custom ConfigPostProcessor, URL comparison enhancements, registration center optimizations, API‑based config, gRPC tweaks, and updates to dubbo-go‑hessian2, with a roadmap toward cloud‑native 3.x.
dubbogo team recently released dubbo-go v1.5.6, aligning it with Dubbo 2.7.8. The update primarily fixes bugs from earlier 1.5 versions and adds several new features.
1. Command‑line tool
A new CLI enables direct calls to specific services by defining request/response structures in a JSON file. It currently supports nested structs, single‑parameter request and response packages, and basic Go data types (string, int, float).
2. Proxy implementation extension
The Proxy has been refactored to include an ImplementFunc function, allowing projects to re‑implement proxy behavior. When using a custom ProxyFactory, the created proxy.Proxy can also be customized to modify returned data.
3. Config file path specification at startup
Previously, only environment variables could specify config files. Now three flags— proConf, conConf, and logConf —allow explicit file paths for provider, consumer, and log configurations.
export CONF_PROVIDER_FILE_PATH="../profiles/dev/server.yml"
export CONF_CONSUMER_FILE_PATH="../profiles/dev/server.yml"
export APP_LOG_CONF_FILE="../profiles/dev/log.yml"Example commands:
go run . -proConf ../profiles/dev/server.yml -logConf ../profiles/dev/log.yml # provider
go run . -conConf ../profiles/dev/client.yml -logConf ../profiles/dev/log.yml # consumer4. Custom ServerConfig and ReferenceConfig loading
A new ConfigPostProcessor interface provides PostProcessServiceConfig(*common.URL) and PostProcessReferenceConfig(*common.URL) methods for custom configuration handling.
5. URL comparison extension
The common/url.go file now includes CompareURLEqualFunc, letting users define custom URL comparison logic for better performance in specific scenarios. Future 3.x versions will split common.URL into ServiceConfigURL</{code}>, <code>ServiceAddressURL, and InstanceAddressURL to reduce change pressure on config, registry, and metadata centers.
6. Registry center optimization
Reused Zookeeper connections and optimized service discovery logic, significantly reducing TCP/Go‑runtime usage. Further optimizations for Nacos, etcd, and Consul are planned.
3C3
7a0API‑a0based configuration writing
Users can now write configuration via API calls instead of static files. See the sample repository https://github.com/apache/dubbo-go-samples/tree/master/config-api for usage.
8. gRPC optimizations
Exposed consumer connect_timeout and gRPC server timeout settings, allowing custom gRPC timeout mechanisms.
Synchronized handling of registry service change events to prevent out‑of‑order processing during frequent provider restarts.
When using gRPC, the server now registers all services only after every Dubbo‑go service is fully exposed, fixing the issue where only one service could be registered.
connect_timeout: "3s"
application:
organization: "dubbo.io"
name: "GreeterGrpcConsumer"
module: "dubbo-go greeter grpc client"
version: "0.0.1"
environment: "dev"9. dubbo-go‑hessian2 latest features
Version v1.9.2 adds built‑in support for java.util.Locale, java.util.UUID, encoding of non‑POJO objects, java.sql.Time, and java.sql.Date. Repository: https://github.com/apache/dubbo-go-hessian2 .
10. Review and outlook
dubbo-go 1.5 is stable and will continue to receive bug fixes and minor optimizations. The upcoming 3.0 line is moving toward cloud‑native architecture, with a first release expected by the end of April.
For more details, see the official release page: https://github.com/apache/dubbo-go/releases/tag/v1.5.6 .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Native
We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
