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

Document consequences of single threaded response handling

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0
    • Component/s: admin
    • Labels:
      None

      Description

      If users block the response handling thread in one call waiting for the result of a second "nested" call then the client effectively hangs because the 2nd call's response will never be processed. For example:

              admin.listTopics().names().thenApply(topics -> {
                  // ... Some code to decide the topicsToCreate based on the topics
                  admin.createTopics(topicsToCreate).all().get()
                  return null;
              }).get();
      

      The createTopics()...get() blocks, indefinitely preventing the ListTopics response processing from dealing with the CreateTopics response.

      This can be surprising to users of the Admin API, so we should at least document that this pattern should not be used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tombentley Tom Bentley
                Reporter:
                tombentley Tom Bentley
                Reviewer:
                Chia-Ping Tsai
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: