- The HTTP Sink connector listen to the incoming HttpRequest topics (can be a list of topics, or a regex, via topics or topics.regex settings)
- a converter convert the byte array either as a string, or from a binary format described in a schema (Avro, JSON Schema or Protobuf) to a Struct
- a sink task which get multiple records each time, convert the record (String or Struct) into an HttpRequest object.
- the sink task select the right configuration according to the predicate bound to it (the HttpRequest is tested against the predicate).
- if configured, the configuration add some additional static headers.
- if configured, the configuration add a correlation id if not found.
- if configured, the configuration add a request id if not found.
- a request is asked to the HTTP client
- a throttling via the rate limiter is applied
- the request is executed against the web site
- the response is received, and the HttpExchange is built and enriched with a status (based on the
config.<idconfig>.enrich.exchange.success.response.code.regex
) - a decision is made against the HttpExchange status build in the previous stage
- if the HttpExchange status is a success, the HttpExchange is serialized into the in memory queue
- if the HttpExchange status is not a success, an evaluation is done to know if the error is retryable (based on the
config.<idconfig>.retry.policy.response.code.regex
) - if the error is not retryable, or the retry attempts limit is reached, the failing HttpExchange is serialized into the in memory queue.
- if the error is retryable, another HTTP call is done.