unit test to make sure null `group.id` and valid `group.instance.id` are valid combo
As title suggests, this unit test is just a double check. No need to push in 2.3
Reviewers: Guozhang Wang Matthias J. Sax
@@ -210,6 +210,16 @@ public class KafkaConsumerTest {
new KafkaConsumer<>(config, new ByteArrayDeserializer(), new ByteArrayDeserializer());
}
+ @Test
+ public void shouldIgnoreGroupInstanceIdForEmptyGroupId() {
+ Map<String, Object> config = new HashMap<>();
+ config.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999");
+ config.put(ConsumerConfig.GROUP_INSTANCE_ID_CONFIG, "instance_id");
+ KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(
+ config, new ByteArrayDeserializer(), new ByteArrayDeserializer());
+ consumer.close();
+ }
+
@Test
public void testSubscription() {
KafkaConsumer<byte[], byte[]> consumer = newConsumer(groupId);
