feat: add capnp

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-02-27 12:15:35 +01:00
parent 3162971c89
commit 749ae245c7
115 changed files with 16596 additions and 31 deletions

View File

@@ -0,0 +1,65 @@
@0xb8f6c1e2a3d4e5f6;
struct MessageHeader {
key @0 :Text;
value @1 :Data;
}
struct PublishMessage {
topic @0 :Text;
key @1 :Data;
value @2 :Data;
headers @3 :List(MessageHeader);
}
struct PublishRequest {
messages @0 :List(PublishMessage);
ackMode @1 :UInt8;
producerId @2 :Text;
}
struct PublishResult {
topic @0 :Text;
partition @1 :UInt32;
offset @2 :UInt64;
}
struct PublishResponse {
results @0 :List(PublishResult);
}
struct SubscribeRequest {
topic @0 :Text;
partition @1 :UInt32;
consumerGroup @2 :Text;
startOffset @3 :UInt64;
hasStartOffset @4 :Bool;
maxBatchSize @5 :UInt32;
}
struct ConsumedMessage {
offset @0 :UInt64;
topic @1 :Text;
partition @2 :UInt32;
key @3 :Data;
value @4 :Data;
headers @5 :List(MessageHeader);
timestampMs @6 :UInt64;
}
struct SubscribeResponse {
messages @0 :List(ConsumedMessage);
}
struct AckRequest {
consumerGroup @0 :Text;
topic @1 :Text;
partition @2 :UInt32;
offset @3 :UInt64;
}
struct AckResponse {}
struct ErrorResponse {
message @0 :Text;
}