static RoutableFactory createPutDocumentReplyFactory() {
        return ProtobufCodecBuilder
                .of(WriteDocumentReply.class, DocapiFeed.PutDocumentResponse.class)
                .encoder((apiReply) ->
                        DocapiFeed.PutDocumentResponse.newBuilder()
                                .setModificationTimestamp(apiReply.getHighestModificationTimestamp())
                                .build())
                .decoder(DocapiFeed.PutDocumentResponse.parser(), (protoReply) -> {
                    var reply = new WriteDocumentReply(DocumentProtocol.REPLY_PUTDOCUMENT);
                    reply.setHighestModificationTimestamp(protoReply.getModificationTimestamp());
                    return reply;
                })
                .build();
    }
Implementation of MessageBus message request/response serialization built around Protocol Buffers.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableFactories80.java