66 lines
1.0 KiB
Cap'n Proto
66 lines
1.0 KiB
Cap'n Proto
@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;
|
|
}
|