[ 
https://issues.apache.org/jira/browse/SCB-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500364#comment-16500364
 ] 

ASF GitHub Bot commented on SCB-627:
------------------------------------

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:
us...@infra.apache.org


> Java Chassis- Client Request Timeout support for operation/schema/service 
> level
> -------------------------------------------------------------------------------
>
>                 Key: SCB-627
>                 URL: https://issues.apache.org/jira/browse/SCB-627
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.0.0-m2
>            Reporter: Mahesh Raju Somalaraju
>            Assignee: Mahesh Raju Somalaraju
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> Currently request timeout support is there at global level.
> Need to support Client Request Timeout for operation/schema/service level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to