Closed MelamudMichael closed 6 months ago
struct RpcResponse { uprotocol::v1::UStatus status; uprotocol::utransport::UMessage message; };
IMHO the response should be a UPayload
Why would a client asking for RPC be interested in anything else? IMHO, keeping it simple and returning the status and the payload has advantages over a UMessage whose purpose in life is to provide state changes.
@MelamudMichael can you please provide documentation/description of to the justifications for the requested API? Is this for C++ only or in the specification for all programming languages?
@tamarafischer are you requesting we go back to UPayload in lieu of returning UMessage? It was a mistake to use UMessage for RpcClient, that I will admit and willing to move back for 1.5.8 to UPayload.
@tamarafischer are you requesting we go back to UPayload in lieu of returning UMessage? It was a mistake to use UMessage for RpcClient, that I will admit and willing to move back for 1.5.8 to UPayload.
No. I am suggesting something new. Not UMessage and Not UPayload.
A new structure that @MelamudMichael provided, with a small change The Struct is called RpcResponseUMessage and contains 2 parts: UStatus - success or failure of the RPC request UPayload - the response from the desination in the case the message was successfully delivered.
Yes going back to using UPayload but adding the Status - @MelamudMichael explained the why
Michael coded his part, I can code the Java and it goes in core and can be a proto message the same way UMessage is. I am also good with a simple interface :)
Closing as duplicate of #82 , moving the proposal to that issue.
Suggestion for API -
UStatus invokeMethod(const uprotocol::v1::UUri &topic, const uprotocol::utransport::UPayload &payload, const uprotocol::v1::CallOptions &options const uprotocol::utransport::UListener &callback) = 0;