Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14455

Kafka Connect create and update REST APIs should surface failures while writing to the config topic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0, 3.4.1, 3.3.3
    • connect
    • None

    Description

      Kafka Connect's `POST /connectors` and `PUT /connectors/{connector}/config` REST APIs internally simply write a message to the Connect cluster's internal config topic (which is then processed asynchronously by the herder). However, no callback is passed to the producer's send method and there is no error handling in place for producer send failures (see here / here).

      Consider one such case where the Connect worker's principal doesn't have a WRITE ACL on the cluster's config topic. Now suppose the user submits a connector's configs via one of the above two APIs. The producer send here / here won't succeed (due to a TopicAuthorizationException) but the API responses will be `201 Created` success responses anyway. This is a very poor UX because the connector will actually never be created but the API response indicated success. Furthermore, this failure would only be detectable if TRACE logs are enabled (via this log) making it near impossible for users to debug. Producer callbacks should be used to surface write failures back to the user via the API response.

      Attachments

        Issue Links

          Activity

            People

              yash.mayya Yash Mayya
              yash.mayya Yash Mayya
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: