[ 
https://issues.apache.org/jira/browse/KAFKA-20959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean McNamara updated KAFKA-20959:
----------------------------------
    Description: 
We are observing an issue with kafka consumer that affects versions 3.2.1 and 
up to 4.2.x (and likely beyond) that I tested. When subscribing to topic(s) 
using a regex pattern, if a topic gets deleted it indefinitely blocks the 
consumer.

The consumer will keep logging this message over and over:
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.

When this happens the consumer will not consume from any other topics that it 
subscribed to, it just gets completely stuck.

I pushed up a repo onto github so the issue can easily be reproduced here: 
[https://github.com/subprotocol/kafka-consumer-group-bug/blob/main/src/main/java/org/example/Example.java]

 

Could someone take a look?

 

Thanks

  was:
We are observing an issue with kafka consumer that affects versions 3.2.1 and 
up to 4.2.x that I tested. When subscribing to topic(s) using a regex pattern, 
if a topic gets deleted it indefinitely blocks the consumer.

The consumer will keep logging this message over and over:
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.
2026-08-17 09:50:11 WARN  
org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
[Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
Offset commit failed on partition example-messages-topic1-0 at offset 10: This 
server does not host this topic-partition.

When this happens the consumer will not consume from any other topics that it 
subscribed to, it just gets completely stuck.

I pushed up a repo onto github so the issue can easily be reproduced here: 
[https://github.com/subprotocol/kafka-consumer-group-bug/blob/main/src/main/java/org/example/Example.java]

 

Could someone take a look?

 

Thanks


> Blocked consumer using regex topic subscription
> -----------------------------------------------
>
>                 Key: KAFKA-20959
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20959
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 4.2.0
>            Reporter: Sean McNamara
>            Priority: Major
>
> We are observing an issue with kafka consumer that affects versions 3.2.1 and 
> up to 4.2.x (and likely beyond) that I tested. When subscribing to topic(s) 
> using a regex pattern, if a topic gets deleted it indefinitely blocks the 
> consumer.
> The consumer will keep logging this message over and over:
> 2026-08-17 09:50:11 WARN  
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
> [Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
> Offset commit failed on partition example-messages-topic1-0 at offset 10: 
> This server does not host this topic-partition.
> 2026-08-17 09:50:11 WARN  
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
> [Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
> Offset commit failed on partition example-messages-topic1-0 at offset 10: 
> This server does not host this topic-partition.
> 2026-08-17 09:50:11 WARN  
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:1373 - 
> [Consumer clientId=consumer-example-consumer-1, groupId=example-consumer] 
> Offset commit failed on partition example-messages-topic1-0 at offset 10: 
> This server does not host this topic-partition.
> When this happens the consumer will not consume from any other topics that it 
> subscribed to, it just gets completely stuck.
> I pushed up a repo onto github so the issue can easily be reproduced here: 
> [https://github.com/subprotocol/kafka-consumer-group-bug/blob/main/src/main/java/org/example/Example.java]
>  
> Could someone take a look?
>  
> Thanks



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

Reply via email to