【发布时间】:2020-03-07 03:36:05
【问题描述】:
是否(实际上)可以在不中断通信的情况下更改 protobuf message type (or enum) 的类型名称?
很明显,使用 代码 需要修改以重新编译。问题是使用相同结构但旧名称的旧客户端是否会继续工作?
示例,基于真实文件:
test.proto:
syntax = "proto3";
package test;
// ...
message TestMsgA {
message TestMsgB { // should be called TestMsgZZZ going forward
// ...
enum TestMsgBEnum { // should be called TestMsgZZZEnum going forward
// ...
}
TestMsgBEnum foo = 1;
// ...
}
repeated TestMsgB bar = 1;
// ...
}
如果类型或枚举名称发生变化,protobuf 有效负载的在线格式是否会发生任何变化?
【问题讨论】: