I have just read the tutorials and the some threads in these forums,
but there's one thing that I can't find an answer for. I'm currently
using a router that is responsible to route different messages to
different servers. The protocol that we are currently using is a very
simple. Basically header:tag=value:tag=value: and so on.

The router looks for a field with certain name (e.g. cookie) and
routes a message based on the information in the value of that tag,
and also modifies that field.

Is it possible to write a similar router for PB? The router that we
have shouldn't know about all message types. It just need to know that
a field with a certain tag always should exist and that the field has
a value. I don't parse the data of the wire into messages, do
modifications and then write them back to the wire.

So, in short. How to do that using PB?

I'm also a bit curious on how to decode arbritrary messages, modify
them and write tham back (even if I won't do that). How do you
normally modify messages since they are immutable? Is there a way to
get a builder for a certain message, and have the builder initialized
so that it represents a copy of the original message?

I'm using Java if that makes a difference


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to