You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "fangyincheng (GitHub)" <gi...@apache.org> on 2020/03/18 12:03:50 UTC

[GitHub] [dubbo-go-hessian2] fangyincheng commented on issue #165: release note for v1.4.0

## 支持忽略非注册pojo的解析方式
由于hessian编码协议与java的类型高度耦合,在golang的实现中会相对比较麻烦,需要有指明的对应类型,dubbo-go-hessian2的实现方式是:定义POJO接口,要求实现JavaClassName方法来供程序获取java对应的类名。这导致了接收到包含未注册类的请求时,将会无法解析而报错,这个问题目前是无法解决的。但是,有一种需求——网关,需要将dubbo请求转发,就像http读取head信息一样,网关也需要读取dubbo请求的附加信息,此时,程序并不关注具体body,于是需要实现在数据流的解析中跳过无法解析的具体类型,直接读取attachments的内容。pr: https://github.com/apache/dubbo-go-hessian2/pull/128 。该实现中通过在Decoder中添加的skip字段,对每一个object做出特殊处理。

[ Full content available at: https://github.com/apache/dubbo-go-hessian2/pull/165 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org