You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "PoAn Yang (Jira)" <ji...@apache.org> on 2024/05/03 00:49:00 UTC

[jira] [Commented] (KAFKA-16659) KafkaConsumer#position() does not respect wakup when group protocol is CONSUMER

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

PoAn Yang commented on KAFKA-16659:
-----------------------------------

Hi [~chia7712], are you working on this? If not, may I take it? Thank you.

> KafkaConsumer#position() does not respect wakup when group protocol is CONSUMER
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-16659
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16659
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>
> see following test
> {code:scala}
>   @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumAndGroupProtocolNames)
>   @MethodSource(Array("getTestQuorumAndGroupProtocolParametersAll"))
>   @Timeout(15)
>   def testPositionRespectsWakeup(quorum: String, groupProtocol: String): Unit = {
>     val topicPartition = new TopicPartition(topic, 15)
>     val consumer = createConsumer()
>     consumer.assign(List(topicPartition).asJava)
>     CompletableFuture.runAsync { () =>
>       TimeUnit.SECONDS.sleep(1)
>       consumer.wakeup()
>     }
>     assertThrows(classOf[WakeupException], () => consumer.position(topicPartition, Duration.ofSeconds(3)))
>   }
> {code}



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