[ 
https://issues.apache.org/jira/browse/KAFKA-19205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947381#comment-17947381
 ] 

Chia-Ping Tsai commented on KAFKA-19205:
----------------------------------------

this can be reproduced by following code.

{code:scala}
  @ParameterizedTest(name = 
TestInfoUtils.TestWithParameterizedGroupProtocolNames)
  @MethodSource(Array("getTestGroupProtocolParametersAll"))
  def test(groupProtocol: String): Unit = {
    val consumer = createConsumer()
    val result2 = consumer.beginningOffsets(Collections.singleton(new 
TopicPartition(topic, 0)), Duration.ZERO)
    assertEquals(1, result2.size())
    assertTrue(result2.containsKey(new TopicPartition(topic, 0)))
    assertNull(result2.get(new TopicPartition(topic, 0)))

    val result3 = consumer.endOffsets(Collections.singleton(new 
TopicPartition(topic, 0)), Duration.ZERO)
    assertEquals(1, result3.size())
    assertTrue(result3.containsKey(new TopicPartition(topic, 0)))
    assertNull(result3.get(new TopicPartition(topic, 0)))
  }
{code}


> inconsistent result of beginningOffsets/endoffset between classic consumer 
> and async consumer with zero timeout
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-19205
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19205
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Major
>
> classic consumer returns empty map, but async consumer returns map having 
> targets with null



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to