syntax = "proto3";

message QuerySubscribeRequest {
    string Topic = 1;
    int32 Qos = 2;
}

message QueryConnectRequest {
    string ClientID = 1;
}

message DeliverMessageRequest {
    string Topic = 1;
    bytes  Payload = 2;
    int32 Qos = 3;
}

message Response {
    int32 RetCode = 1;
    string Message = 2;
}

//Service define
service HMQService {
    rpc QuerySubscribe(QuerySubscribeRequest) returns  (Response) {}
    rpc QueryConnect(QueryConnectRequest) returns (Response) {}
    rpc DeliverMessage(DeliverMessageRequest) returns (Response) {}
}