You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -379,18 +379,26 @@ is provided.
379
379
380
380
381
381
## HTTP status code handler
382
-
Http Sink and Lookup Source connectors allow defining list of HTTP status codes that should be treated as errors.
383
-
By default all 400s and 500s response codes will be interpreted as error code.
382
+
383
+
Http Sink and Lookup Source connectors allow defining list of HTTP status codes for which connector either retry
384
+
request according to defined strategy, or returns empty result.
385
+
By default, all 400s are interpreted as non-retryable errors, while 500s response codes as retryable errors.
384
386
385
387
This behavior can be changed by using below properties in table definition (DDL) for Sink and Lookup Source or passing it via
386
388
`setProperty' method from Sink's builder. The property names are:
387
-
-`gid.connector.http.sink.error.code` and `gid.connector.http.source.lookup.error.code` used to defined HTTP status code value that should be treated as error for example 404.
389
+
-`gid.connector.http.sink.error.non-retryable.code` and `gid.connector.http.source.lookup.error.non-retryable.code`, allow to define HTTP status code values that should be treated as non-retryable error.
390
+
-`gid.connector.http.sink.error.retryable.code` and `gid.connector.http.source.lookup.error.retryable.code`, allow to define HTTP status code values that should be treated as retryable error.
391
+
388
392
Many status codes can be defined in one value, where each code should be separated with comma, for example:
389
393
`401, 402, 403`. User can use this property also to define a type code mask. In that case, all codes from given HTTP response type will be treated as errors.
390
394
An example of such a mask would be `3XX, 4XX, 5XX`. In this case, all 300s, 400s and 500s status codes will be treated as errors.
391
-
-`gid.connector.http.sink.error.code.exclude` and `gid.connector.http.source.lookup.error.code.exclude` used to exclude a HTTP code from error list.
392
-
Many status codes can be defined in one value, where each code should be separated with comma, for example:
393
-
`401, 402, 403`. In this example, codes 401, 402 and 403 would not be interpreted as error codes.
395
+
396
+
Another set of properties are:
397
+
-`gid.connector.http.sink.error.non-retryable.code.exclude` and `gid.connector.http.source.lookup.error.non-retryable.code.exclude` used to exclude an HTTP code from non-retryable error list.
398
+
-`gid.connector.http.sink.error.retryable.code.exclude` and `gid.connector.http.source.lookup.error.retryable.code.exclude` used to exclude an HTTP code from retryable error list.
399
+
400
+
Many status codes can be defined in one value, where each code should be separated with comma, for example:
401
+
`401, 402, 403`. In this example, codes 401, 402 and 403 would not be interpreted as error codes.
394
402
395
403
## TLS and mTLS support
396
404
Both Http Sink and Lookup Source connectors supports Https communication using TLS 1.2 and mTLS.
@@ -455,8 +463,12 @@ be requested if the current time is later than the cached token expiry time minu
455
463
| lookup.retry-strategy.exponential-delay.attempts | optional | The number of times that connector retries lookup execution before connector returns empty result. |
456
464
| lookup.retry-strategy.exponential-delay.initial-delay | optional | Initial delay between two consecutive retry attempts. |
457
465
| lookup.retry-strategy.exponential-delay.max-delay | optional | The highest possible duration between two consecutive retry attempts. |
458
-
| gid.connector.http.lookup.error.code | optional | List of HTTP status codes that should be treated as errors by HTTP Source, separated with comma. |
459
-
| gid.connector.http.lookup.error.code.exclude | optional | List of HTTP status codes that should be excluded from the `gid.connector.http.lookup.error.code` list, separated with comma. |
466
+
| gid.connector.http.lookup.error.code | optional | (Deprecated) List of HTTP status codes that should be treated as errors by HTTP Source, separated with comma. |
467
+
| gid.connector.http.lookup.error.code.exclude | optional | (Deprecated) List of HTTP status codes that should be excluded from the `gid.connector.http.lookup.error.code` list, separated with comma. |
468
+
| gid.connector.http.lookup.error.non-retryable.code | optional | List of HTTP status codes that should be treated as errors for which HTTP Source should not retry request, separated with comma. |
469
+
| gid.connector.http.lookup.error.non-retryable.code.exclude | optional | List of HTTP status codes that should be excluded from the `gid.connector.http.lookup.error.code` list, separated with comma. |
470
+
| gid.connector.http.lookup.error.retryable.code | optional | List of HTTP status codes that should be treated as errors for which HTTP Source should retry request, separated with comma. |
471
+
| gid.connector.http.lookup.error.retryable.code.exclude | optional | List of HTTP status codes that should be excluded from the `gid.connector.http.lookup-retryable.error.code` list, separated with comma. |
460
472
| gid.connector.http.security.cert.server | optional | Path to trusted HTTP server certificate that should be add to connectors key store. More than one path can be specified using `,` as path delimiter. |
461
473
| gid.connector.http.security.cert.client | optional | Path to trusted certificate that should be used by connector's HTTP client for mTLS communication. |
462
474
| gid.connector.http.security.key.client | optional | Path to trusted private key that should be used by connector's HTTP client for mTLS communication. |
Copy file name to clipboardExpand all lines: src/test/java/com/getindata/connectors/http/internal/table/lookup/JavaNetHttpPollingClientConnectionTest.java
0 commit comments