Current state: "Discarded"

Discussion thread: here 


Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).


KAFKA-4279 states "We have a REST resource that allows users to see the available plugins, but we have no equivalent that allows listing available converters".

I propose that we implement a generic "filter" API which will list connector plugins matched by type (one of SOURCE,SINK,CONVERTER,HEADER_CONVERTER).

Public Interfaces

We will add a new REST endpoint for Connect:

GET /connector-plugins/filter?pluginType=CONVERTER

Proposed Changes

The proposed REST endpoint will accept a query parameter pluginType based on which connector plugins are filtered.

Sample response if pluginType is set to header_converter

    "class": "org.apache.kafka.connect.json.JsonConverter",
    "type": "converter"
    "class": "",
    "type": "header_converter"
    "class": "",
    "type": "converter"

Sample response if pluginType is set to invalid type

  "error_code": 400,
  "message": "pluginType must be set to one of: SOURCE,SINK,CONVERTER,HEADER_CONVERTER"

Compatibility, Deprecation, and Migration Plan

Since this is a new REST API, there should not be any concerns on compatibility, deprecation and migration.

Rejected Alternatives

Today listConnectorPlugins API supports an optional flag, connectorsOnly, which is set to "true" by default. We could have a similar flag "convertersOnly", but this would cause confusion.

Eg: User would assume that GET /connector-plugins?convertersOnly=true should list only converter plugins, but it will include source and sink plugins as well.

If we change the default value of connectorsOnly, user will have to explicitly specify the value while listing connector plugins  - which is a deviation from current usage.

  • No labels