Re: [protobuf] How to know what type of message it is?

2013-03-21 Thread Feng Xiao
On Thu, Mar 21, 2013 at 4:24 PM, Ilia Mirkin wrote: > I don't know about zeromq, but rabbitmq allows you to have multiple > endpoints. If that is the case, you can have diff types for diff > endpoints. If not, you can create a container message like > > message TheOneAndOnlyMessage { > required

Re: [protobuf] How to know what type of message it is?

2013-03-21 Thread Ilia Mirkin
I don't know about zeromq, but rabbitmq allows you to have multiple endpoints. If that is the case, you can have diff types for diff endpoints. If not, you can create a container message like message TheOneAndOnlyMessage { required string type = 1; optional bytes value = 2; } And then the byt

Re: [protobuf] How to know what type of message it is?

2013-03-21 Thread kramer65
Alright, in that case I totally need to change my setup. I'm working on a project in which we are trying to fly a large kite using built in steering. For this we've set up a network connection with the kite to send and receive messages. For example: we measure altitude, direction, speed, etc. a

Re: [protobuf] How to know what type of message it is?

2013-03-21 Thread Feng Xiao
On Thu, Mar 21, 2013 at 3:48 PM, kramer65 wrote: > Hello people, > > I'm just starting out with protobuf but I hope someone can enlighten me a > bit. > > Lets say that I've got a couple message types defined. Now when a new > message comes in (via zeromq) I don't know what type of message it is u

[protobuf] How to know what type of message it is?

2013-03-21 Thread kramer65
Hello people, I'm just starting out with protobuf but I hope someone can enlighten me a bit. Lets say that I've got a couple message types defined. Now when a new message comes in (via zeromq) I don't know what type of message it is until I deserialize it, but to deserialize it I need to know