Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set CompatibleFieldSerializer as default serializer in kryo #264

Open
wang-laoshi opened this issue Nov 22, 2023 · 2 comments
Open

Comments

@wang-laoshi
Copy link

wang-laoshi commented Nov 22, 2023

I want to ask everyone
I use kryo as the serialization method of dubbo3
dubbo.protocol.serialization: kryo

kryo has multiple serialization methods, the default is FieldSerializer
I want to use CompatibleFieldSerializer (guaranteed backward compatibility)

One current approach is to add
@DefaultSerializer(CompatibleFieldSerializer.class)

But every class needs to be added. I hope dubbo will use CompatibleFieldSerializer for serialization globally. How to do it?


各位我想问一下
我用kryo作为dubbo3的序列化方式
dubbo.protocol.serialization: kryo

kryo是多种序列化方式,默认是FieldSerializer
我想使用CompatibleFieldSerializer(保证向下兼容)

目前一个做法是,在需要被序列化的类上加上
@DefaultSerializer(CompatibleFieldSerializer.class)

但是这种每个类都要加,我希望dubbo全局都使用CompatibleFieldSerializer进行序列化,怎么弄?

@AlbumenJ AlbumenJ changed the title 如何让CompatibleFieldSerializer成为dubbo的kryo默认序列化方式 How to set CompatibleFieldSerializer as default serializer in kryo Nov 29, 2023
@AlbumenJ
Copy link
Member

AlbumenJ commented Nov 29, 2023

You may submit a issue to apache/dubbo-spi-extensions repo. Kryo has been moved to spi-extensions in 3.x.

@CrazyHZM CrazyHZM transferred this issue from apache/dubbo Dec 25, 2023
@songxiaosheng
Copy link
Member

May I ask which dubbo version you are using? I don’t see this type of CompatibleFieldSerializer in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants