Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a connector is created in a PAUSED or STOPPED state, the connector will be assigned to a worker post group rebalance and the connector thread will be created but the actual Connector instance won't be started. No tasks will be created for such connectors until they're resumed. The only difference between creating a connector in the PAUSED state versus the STOPPED state is that offsets modification will only be possible in the STOPPED state. There isn't any scenario where creating a connector in the PAUSED state is advantageous over creating it in the STOPPED state - however, since it's still a valid connector state and has been present for a lot longer than the STOPPED state, we allow it ( PAUSED was introduced in AK 0.10.0.0 and STOPPED was introduced in AK 3.5.0).

...

Rejected because: It isn't particularly useful to allow modifying the state of a connector along with updating its configuration since both those operations can already be done separately (whereas with the connector creation case, it isn't currently possible to modify the state of a non-existent connector) and the POST /connectors endpoint already covers the connector creation case. Furthermore, the PUT /connectors/{connector}/config endpoint currently accepts a map of connector key-value  configurations as its request body (OpenAPI specification for reference), and adding a new "state"  field would require significantly modifying the request body format and supporting two different request body formats for the endpoint. We could potentially use a request parameter or request header to specify the state, but it would be fairly unusual to have two completely different ways of specifying the connector state across two endpoints (and it seems more appropriate to include the state in the request body anyway since it's a part of the request itself rather than metadata or a modifier).

Only allow creating connectors in RUNNING / STOPPED states

Summary: Since there is no real advantage to creating connectors in a PAUSED state versus the STOPPED state, disallow creating connectors in the PAUSED state to reduce the surface area of the API.

Rejected because: The PAUSED state is still a valid connector state and has been present for a lot longer than the STOPPED state ( PAUSED was introduced in AK 0.10.0.0 and STOPPED was introduced in AK 3.5.0). It would likely be more confusing for users if we treated PAUSED as an invalid state in the connector creation request body.