Versions Compared

Key

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

...

Code Block
languagejava
titleResponseInfo Interface
linenumberstrue
public interface ResponseInfo {
  /* @return a map of error to its count of occurrence.
   */
  public Map<Errors, Integer> getErrorCounts();

  /* This method should only be invoked if the response is of type ApiKeys.FETCH. Otherwise, an exception is thrown.
   * @return a map of topic partition to the number of bytes that are fetched from this topic partitionit.
   */
  public Map<TopicPartition, Long> getFetchFromTopicPartitionSizeInBytes();
  
  /* This method should only be invoked if the response is of type ApiKeys.FETCH. Otherwise, an exception is thrown.
   * @return a map of topic partition to the number of records that are fetched from it.
   */
  public Map<TopicPartition, Long>Integer> getFetchFromTopicPartitionSizeInBytesgetFetchFromTopicPartitionRecordCount();
}

This interface defines the methods that can be used in the client's implementation of the observer to extract information from the response.

...