Is is possible to convert DynamicMessage to Message in proto bufs? I know Message can be converted into DynamicMessage though.
Any idea?
DynamicMessage implements the Message interface, so it already is a Message. Do you mean you want to convert a DynamicMessage to a specific type generated using protoc? In that case, the best thing to do is serialize the message and then parse it again.
MyMessageType.parseFrom(dynamicMessage.toByteString());