[protobuf] Golang Dynamically create Message from .proto files

2023-10-21 Thread 'Gary Vidal' via Protocol Buffers
I have a use case where I need to dynamically read a .proto definition and deserialize a byte array of matching message. I scoured the internet does anyone have a working example. I am writing a kafka plugin that filters messages and uses a schema registry to store and retrieve proto files.

[protobuf] Unclearness in the specification

2023-10-21 Thread Mattias Hansson
I am currently trying to implement a protobuf parser but it's a bit unclear to me how I should interpret some parts of the specification. Lets start with RPC option. Options for normal fields and enum fields are pretty clear. Here's the specification for normal fields: field = [ "repeated" ]

[protobuf] Re: Documentation about endianness support

2023-10-21 Thread Marc Gravell
protobuf ensures that the *value of primitives* will be preserved; so if you send the uint32 23433451, it will be decoded as 23433451 regardless of the CPU/process endianness of sender and receiver. The details are here: https://protobuf.dev/programming-guides/encoding/ - but they **don't

Re: [protobuf] Documentation about endianness support

2023-10-21 Thread 'Eric Salo' via Protocol Buffers
An integer sent from one machine to another will preserve its value regardless of the endianness of either machine. If you wish to attach additional semantic meaning to that integer by using it to encode an ipv4 address then you need to take the appropriate steps to translate the local value to

[protobuf] Documentation about endianness support

2023-10-21 Thread Kumar bhat
What happens if a uint32_t is sent from little endian system and received by bit endian system. For eg: An Ipv4 address. Can we send the IP address in any byte order and be able to see the same value in receiver of a different endian machine? If thats the case, I dont see any documentation for