diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java index e24e4a7bae..2fb469e4d4 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java @@ -242,6 +242,15 @@ public class InvokeHTTP extends AbstractProcessor { .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); + public static final PropertyDescriptor SOCKET_WRITE_TIMEOUT = new PropertyDescriptor.Builder() + .name("Socket Write Timeout") + .displayName("Socket Write Timeout") + .description("Maximum time to wait for write operations while sending requests from a socket connection to the HTTP URL.") + .required(true) + .defaultValue("15 secs") + .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) + .build(); + public static final PropertyDescriptor SOCKET_IDLE_TIMEOUT = new PropertyDescriptor.Builder() .name("idle-timeout") .displayName("Socket Idle Timeout") @@ -505,6 +514,7 @@ public class InvokeHTTP extends AbstractProcessor { SSL_CONTEXT_SERVICE, SOCKET_CONNECT_TIMEOUT, SOCKET_READ_TIMEOUT, + SOCKET_WRITE_TIMEOUT, SOCKET_IDLE_TIMEOUT, SOCKET_IDLE_CONNECTIONS, PROXY_CONFIGURATION_SERVICE, @@ -731,6 +741,7 @@ public class InvokeHTTP extends AbstractProcessor { okHttpClientBuilder.followRedirects(context.getProperty(RESPONSE_REDIRECTS_ENABLED).asBoolean()); okHttpClientBuilder.connectTimeout((context.getProperty(SOCKET_CONNECT_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue()), TimeUnit.MILLISECONDS); okHttpClientBuilder.readTimeout(context.getProperty(SOCKET_READ_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue(), TimeUnit.MILLISECONDS); + okHttpClientBuilder.writeTimeout(context.getProperty(SOCKET_WRITE_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue(), TimeUnit.MILLISECONDS); okHttpClientBuilder.connectionPool( new ConnectionPool( context.getProperty(SOCKET_IDLE_CONNECTIONS).asInteger(),