luchunliang opened a new issue #2375:
URL: https://github.com/apache/incubator-inlong/issues/2375


   ### Description
   
   Support new protocol format of proxy sdk and cache message, based on 
Protobuffer protocol.
   New protocol will replace TDMsg protocol. It will be more general.
   
   1. Proxy SDK protocol
   Type: TCP
   Protocol: PB
   
   - Main format of request
   <html>
   <body>
   <!--StartFragment-->
   
   Parameter | Length | Remark
   -- | -- | --
   version | 2 | Protocol version, for the different PB protocol.The first 
value is 0x0001.
   totalLength | 4 | The total length of bodyparameter.
   body | totalLength | main data, PB protocol.PB class: MessagePack
   
   <!--EndFragment-->
   </body>
   </html>
   - PB protocol of body parameter (version:1)
   
   > dd
   
   2. 
   
   syntax = "proto3"; 
   package   inlong.dataproxy;
   
   //default java package name 
   option  java_package="org.apache.inlong.dataproxy.client";
   
   enum ResultCode{
     SUCCUSS = 0,                               // success
     FAIL = -1,                         // general error code
     ERR_VERSION_ERROR = -101,  // not support version
     ERR_LENGTH_ERROR = -102,   // error length, the length is negitive or over.
     ERR_REJECT = -103,        // Proxy rejects the request, because proxy can 
not process more data, or the cache cluster can not be connected.
     ERR_PACKAGE_ERROR = -104,  // request data can not be decoded with PB 
protocol.
     ERR_ID_ERROR = -105                // inlongGroupId or inlongStreamId is 
bad; The length is wrong, or the CRC check is wrong.
   }
   
   message ResponseInfo {
     ResultCode result = 1;     //response result
   }
   
   ### Use case
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to