Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update kafka-clients to 3.8.0 past snappy CVEs and implement dum… #482

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>3.4.0</version>
<version>3.8.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import org.apache.kafka.common.MetricName;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.Uuid;

/**
* A class that uses a SingleSubscriptionConsumer to remove the duplicate methods from the kafka
Expand Down Expand Up @@ -121,6 +122,12 @@ private SingleSubscriptionConsumer requireValidConsumer() {
return consumer.get();
}

@Override
public Uuid clientInstanceId(Duration timeout) {
// https://javadoc.io/static/org.apache.kafka/kafka-clients/3.8.0/org/apache/kafka/clients/consumer/KafkaConsumer.html#clientInstanceId-java.time.Duration-
throw new IllegalStateException("Pub/Sub Lite Kafka Connector does not support telemetry");
}

@Override
public Set<TopicPartition> assignment() {
return requireValidConsumer().assignment().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.apache.kafka.common.MetricName;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.Uuid;
import org.apache.kafka.common.errors.UnsupportedVersionException;

class PubsubLiteProducer implements Producer<byte[], byte[]> {
Expand Down Expand Up @@ -77,6 +78,12 @@ public void failed(State from, Throwable failure) {
this.publisher.startAsync().awaitRunning();
}

@Override
public Uuid clientInstanceId(Duration timeout) {
// https://javadoc.io/static/org.apache.kafka/kafka-clients/3.8.0/org/apache/kafka/clients/consumer/KafkaConsumer.html#clientInstanceId-java.time.Duration-
throw new IllegalStateException("Pub/Sub Lite Kafka Connector does not support telemetry");
}

@Override
public void initTransactions() {
throw NO_TRANSACTIONS_EXCEPTION;
Expand Down
Loading