syntax = "proto2";

option java_multiple_files = true;
option java_package = "alluxio.grpc";
option java_outer_classname = "MessagingTransportProto";

package alluxio.grpc.messaging;

message MessagingRequestHeader {
    optional int64 requestId = 1;
}
message MessagingResponseHeader {
    optional int64 requestId = 1;
    optional bool isThrowable = 2;
}
message TransportMessage {
    optional MessagingRequestHeader requestHeader = 1;
    optional MessagingResponseHeader responseHeader = 2;
    optional bytes message = 3;
}

// The messaging transport service.
service MessagingService {
    rpc connect (stream TransportMessage) returns (stream TransportMessage);
}
