Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14048 The Next Generation of the Consumer Rebalance Protocol
  3. KAFKA-15533

Ensure HeartbeatRequestManager only send out some fields once

    XMLWordPrintableJSON

Details

    Description

      We want to ensure ConsumerGroupHeartbeatRequest is as lightweight as possible, so a lot of fields in it don't need to be resend. An example would be the rebalanceTimeoutMs, currently we have the following code:

       

       

      ConsumerGroupHeartbeatRequestData data = new ConsumerGroupHeartbeatRequestData()
          .setGroupId(membershipManager.groupId())
          .setMemberEpoch(membershipManager.memberEpoch())
          .setMemberId(membershipManager.memberId())
          .setRebalanceTimeoutMs(rebalanceTimeoutMs); 

       

       

      We should encapsulate these once-used fields into a class such as HeartbeatMetdataBuilder, and it should maintain a state of whether a certain field needs to be sent or not.

       

      Note that, currently only 3 fields are mandatory in the request:

      • groupId
      • memberEpoch
      • memberId

      Note that on retriable errors and network errors (ex. timeout) a full request should be sent to the broker.

      Attachments

        Issue Links

          Activity

            People

              pnee Philip Nee
              pnee Philip Nee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: