Dhairya-007 opened a new pull request, #29988:
URL: https://github.com/apache/camel/pull/29988

   ## Problem
   
   ```java
   @UriParam(label = "consumer")
   private int clientTimeout;
   ...
   /**
    * Client timeout for consumers
    */
   public int getClientTimeout() {
   ```
   
   `ThriftProducer` passes the option as the timeout of the socket it connects 
with:
   
   ```java
   syncTransport = 
TSSLTransportFactory.getClientSocket(configuration.getHost(), 
configuration.getPort(),
           configuration.getClientTimeout(), sslParams);
   ```
   
   which is the reading the name invites, since on a producer the component 
*is* the client. The consumer uses the same value as the server socket's 
SO_TIMEOUT, waiting for a client:
   
   ```java
   serverSocket.setSoTimeout(configuration.getClientTimeout());
   ...
   syncServerTransport = new TServerSocket(configuration.getPort(), 
configuration.getClientTimeout());
   ...
   asyncServerTransport = new TNonblockingServerSocket(configuration.getPort(), 
configuration.getClientTimeout());
   ```
   
   So the option is used by both sides, and both the label and the description 
say consumer. A producer connecting over TLS has no documented way to set its 
connect timeout, while the one option that does it is filed under the side it 
is not on.
   
   ## Fix
   
   Label it `common` and describe both directions:
   
   > Socket timeout in milliseconds. On a consumer it is the timeout of the 
server socket waiting for a client, and on a producer the timeout of the client 
socket connecting to the server.
   
   Nothing in the runtime path changes - the producer already reads it. The 
regenerated `thrift.json` files are included; the option moves from the 
`consumer` group to `common`, which shifts three lines.


-- 
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