Protobufs are really good for consistent and backward compatibility, but not so good for being first-class Java objects. Adding custom functions to protos is currently not possible. You can get many benefits using Protobufs at the stub level, wrap them in one of your Pojos events, and pass them inside yourself:
public final class Event { private final EventProto proto; public void foo() {
Most projects do not change their .proto file, which is often and almost never incompatible (neither wire nor API). The need to change a lot of code due to proto-changes has never been a problem in my experience.
source share