maheshrajus commented on a change in pull request #744: [SCB-627] Client
Request Timeout support for operation/schema/service level
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/744#discussion_r192779431
##########
File path:
core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java
##########
@@ -160,4 +161,83 @@ public Object parseAddress(String address) {
}
return new URIEndpointObject(address);
}
+
+ /**
+ * Handles the request timeout configurations.
+ *
+ * @param invocation
+ * invocation of request
+ * @return configuration value
+ */
+ public static long getReqTimeout(Invocation invocation) {
+ long value = 0;
+ String config;
+
+ // get the config base on priority.
operationName-->schema-->service-->global
+ String operationName = invocation.getOperationName();
+ String schema = invocation.getSchemaId();
+ String serviceName = invocation.getMicroserviceName();
+
+ config = CONSUMER_REQUEST_TIMEOUT + "." + serviceName + "." + schema + "."
+ operationName;
Review comment:
i just read and passed operation name/schema id/service name to the method
now. any suggestion on how to get operation name/schema/service name without
invocation object ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services