-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3558] Make HonoKafkaConsumer compatible with Kafka 3.5
The HonoKafkaConsumer has been adapted to explicitly enforce a rebalance in order to get assigned partitions for auto-created topics if the metadata.max.age.ms configuration property is not set or is set to a value greater than 500. Kafka 3.5 seems to have changed its rebalancing behavior with regard to auto-created topics. Without this modification, the assignment of new partitions to the consumer will be deferred to after the metadata has become stale, which happens after 5 minutes if not explicitly overridden using the metadata.max.age.ms configuration property.
- Loading branch information
1 parent
a3e6da5
commit e826907
Showing
7 changed files
with
436 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
224 changes: 157 additions & 67 deletions
224
.../kafka-common/src/main/java/org/eclipse/hono/client/kafka/consumer/HonoKafkaConsumer.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
test-utils/core-test-utils/src/main/java/org/eclipse/hono/test/JUnitTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.hono.test; | ||
|
||
|
||
/** | ||
* Utility methods for implementing JUnit tests. | ||
*/ | ||
public final class JUnitTests { | ||
|
||
/** | ||
* Pattern used for the <em>name</em> field of the {@code @ParameterizedTest} annotation. | ||
*/ | ||
public static final String PARAMETERIZED_TEST_NAME_PATTERN = "{displayName} [{index}]; parameters: {argumentsWithNames}"; | ||
|
||
private JUnitTests() { | ||
// prevent instantiation | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.