Path: redb-route/redb.Route.DataFormats.Protobuf/README.md Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.DataFormats.Protobuf/README.md ---- # redb.Route.DataFormats.Protobuf > Documentation and articles: Protocol Buffers as a redb.Route data format, on Google.Protobuf. The body is a generated `IMessage` class (protoc / Grpc.Tools). ```csharp .MarshalProtobuf() // IMessage → byte[], ContentType application/x-protobuf .UnmarshalProtobuf() // byte[] / Stream → OrderMessage context.AddProtobufDataFormat(); // then Marshal("application/x-protobuf") / Unmarshal("application/x-protobuf") // Confluent Schema Registry wire format: magic byte 0, schema id (big-endian int32), message index [0] .MarshalProtobuf(o => { o.ConfluentWireFormat = true; o.SchemaId = 42; }) .UnmarshalProtobuf(o => o.ConfluentWireFormat = true) ``` Schema Registry itself (lookup, registration, id → schema) is out of scope of the format; the framing is there so a message produced with a known id is byte-compatible with Confluent consumers. A body that is not an `IMessage` fails with an error naming the format.