diff --git a/data-plane/THIRD-PARTY.txt b/data-plane/THIRD-PARTY.txt
index 0d207603b0..c38f212b87 100644
--- a/data-plane/THIRD-PARTY.txt
+++ b/data-plane/THIRD-PARTY.txt
@@ -1,5 +1,5 @@
-Lists of 232 third-party dependencies.
+Lists of 242 third-party dependencies.
(Eclipse Public License - v 1.0) (GNU Lesser General Public License) Logback Classic Module (ch.qos.logback:logback-classic:1.4.11 - http://logback.qos.ch/logback-classic)
(Eclipse Public License - v 1.0) (GNU Lesser General Public License) Logback Core Module (ch.qos.logback:logback-core:1.4.11 - http://logback.qos.ch/logback-core)
(Apache License 2.0) brotli4j (com.aayushatharva.brotli4j:brotli4j:1.12.0 - https://github.com/hyperxpro/Brotli4j/brotli4j)
@@ -13,7 +13,8 @@ Lists of 232 third-party dependencies.
(The Apache Software License, Version 2.0) Jackson datatype: jdk8 (com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8)
(The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
(The Apache Software License, Version 2.0) jackson-module-scala (com.fasterxml.jackson.module:jackson-module-scala_2.12:2.15.2 - https://github.com/FasterXML/jackson-module-scala)
- (BSD 2-Clause License) zstd-jni (com.github.luben:zstd-jni:1.5.2-1 - https://github.com/luben/zstd-jni)
+ (Apache License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:3.1.5 - https://github.com/ben-manes/caffeine)
+ (BSD 2-Clause License) zstd-jni (com.github.luben:zstd-jni:1.5.5-1 - https://github.com/luben/zstd-jni)
(The Apache Software License, Version 2.0) bucket4j-core (com.github.vladimir-bukhtoyarov:bucket4j-core:7.4.0 - http://github.com/vladimir-bukhtoyarov/bucket4j/bucket4j-core)
(The Apache Software License, Version 2.0) FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.2 - http://findbugs.sourceforge.net/)
(Apache-2.0) Gson (com.google.code.gson:gson:2.10.1 - https://github.com/google/gson/gson)
@@ -30,7 +31,13 @@ Lists of 232 third-party dependencies.
(BSD) ParaNamer Core (com.thoughtworks.paranamer:paranamer:2.8 - https://github.com/paul-hammant/paranamer/paranamer)
(Apache 2.0 License) scala-logging (com.typesafe.scala-logging:scala-logging_2.12:3.9.4 - https://github.com/lightbend/scala-logging)
(Apache License 2.0) Metrics Core Library (com.yammer.metrics:metrics-core:2.2.0 - http://metrics.codahale.com/metrics-core/)
+ (Apache License, Version 2.0) Apache Commons BeanUtils (commons-beanutils:commons-beanutils:1.9.4 - https://commons.apache.org/proper/commons-beanutils/)
(Apache License, Version 2.0) Apache Commons CLI (commons-cli:commons-cli:1.4 - http://commons.apache.org/proper/commons-cli/)
+ (Apache License, Version 2.0) Apache Commons Collections (commons-collections:commons-collections:3.2.2 - http://commons.apache.org/collections/)
+ (The Apache Software License, Version 2.0) Commons Digester (commons-digester:commons-digester:2.1 - http://commons.apache.org/digester/)
+ (Apache-2.0) Apache Commons IO (commons-io:commons-io:2.13.0 - https://commons.apache.org/proper/commons-io/)
+ (The Apache Software License, Version 2.0) Apache Commons Logging (commons-logging:commons-logging:1.2 - http://commons.apache.org/proper/commons-logging/)
+ (Apache License, Version 2.0) Apache Commons Validator (commons-validator:commons-validator:1.7 - http://commons.apache.org/proper/commons-validator/)
(Unknown license) contract (dev.knative.eventing.kafka.broker:contract:1.0-SNAPSHOT - no url defined)
(Unknown license) core (dev.knative.eventing.kafka.broker:core:1.0-SNAPSHOT - no url defined)
(Unknown license) dispatcher (dev.knative.eventing.kafka.broker:dispatcher:1.0-SNAPSHOT - no url defined)
@@ -184,20 +191,22 @@ Lists of 232 third-party dependencies.
(MIT) argparse4j (net.sourceforge.argparse4j:argparse4j:0.7.0 - http://argparse4j.github.io)
(The BSD License) ANTLR 4 Runtime (org.antlr:antlr4-runtime:4.9.2 - http://www.antlr.org/antlr4-runtime)
(Apache License, Version 2.0) Apache Commons Math (org.apache.commons:commons-math3:3.6.1 - http://commons.apache.org/proper/commons-math/)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-clients:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-metadata:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-raft:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-server-common:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-storage:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-storage-api:3.2.3 - https://kafka.apache.org)
- (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka_2.12:3.2.3 - https://kafka.apache.org)
- (Apache License, Version 2.0) Apache Yetus - Audience Annotations (org.apache.yetus:audience-annotations:0.5.0 - https://yetus.apache.org/audience-annotations)
- (Apache License, Version 2.0) Apache ZooKeeper - Server (org.apache.zookeeper:zookeeper:3.6.3 - http://zookeeper.apache.org/zookeeper)
- (Apache License, Version 2.0) Apache ZooKeeper - Jute (org.apache.zookeeper:zookeeper-jute:3.6.3 - http://zookeeper.apache.org/zookeeper-jute)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-clients:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-group-coordinator:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-metadata:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-raft:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-server-common:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-storage:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-storage-api:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka-tools-api:3.6.0 - https://kafka.apache.org)
+ (The Apache License, Version 2.0) Apache Kafka (org.apache.kafka:kafka_2.12:3.6.0 - https://kafka.apache.org)
+ (Apache License, Version 2.0) Apache Yetus - Audience Annotations (org.apache.yetus:audience-annotations:0.12.0 - https://yetus.apache.org/audience-annotations)
+ (Apache License, Version 2.0) Apache ZooKeeper - Server (org.apache.zookeeper:zookeeper:3.8.2 - http://zookeeper.apache.org/zookeeper)
+ (Apache License, Version 2.0) Apache ZooKeeper - Jute (org.apache.zookeeper:zookeeper-jute:3.8.2 - http://zookeeper.apache.org/zookeeper-jute)
(The Apache License, Version 2.0) org.apiguardian:apiguardian-api (org.apiguardian:apiguardian-api:1.1.2 - https://github.com/apiguardian-team/apiguardian)
(Apache License, Version 2.0) AssertJ fluent assertions (org.assertj:assertj-core:3.22.0 - https://assertj.github.io/doc/assertj-core/)
(Apache 2.0) Awaitility (org.awaitility:awaitility:4.2.0 - http://awaitility.org)
- (The Apache Software License, Version 2.0) jose4j (org.bitbucket.b_c:jose4j:0.7.9 - https://bitbucket.org/b_c/jose4j/)
+ (The Apache Software License, Version 2.0) jose4j (org.bitbucket.b_c:jose4j:0.9.3 - https://bitbucket.org/b_c/jose4j/)
(The MIT License) Checker Qual (org.checkerframework:checker-qual:3.34.0 - https://checkerframework.org/)
(Apache License, Version 2.0) MicroProfile Config API (org.eclipse.microprofile.config:microprofile-config-api:3.0.3 - https://microprofile.io/project/eclipse/microprofile-config/microprofile-config-api)
(Apache License, Version 2.0) MicroProfile Context Propagation (org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api:1.3 - http://microprofile.io/microprofile-context-propagation-api)
@@ -223,8 +232,9 @@ Lists of 232 third-party dependencies.
(GNU General Public License (GPL), version 2, with the Classpath exception) JMH Core (org.openjdk.jmh:jmh-core:1.37 - http://openjdk.java.net/projects/code-tools/jmh/jmh-core/)
(GNU General Public License (GPL), version 2, with the Classpath exception) JMH Generators: Annotation Processors (org.openjdk.jmh:jmh-generator-annprocess:1.37 - http://openjdk.java.net/projects/code-tools/jmh/jmh-generator-annprocess/)
(The Apache License, Version 2.0) org.opentest4j:opentest4j (org.opentest4j:opentest4j:1.2.0 - https://github.com/ota4j-team/opentest4j)
+ (The MIT License) PCollections (org.pcollections:pcollections:4.0.1 - https://github.com/hrldcpr/pcollections)
(Apache-2.0) Scala Library (org.scala-lang:scala-library:2.12.15 - https://www.scala-lang.org/)
- (Apache-2.0) scala-collection-compat (org.scala-lang.modules:scala-collection-compat_2.12:2.6.0 - http://www.scala-lang.org/)
+ (Apache-2.0) scala-collection-compat (org.scala-lang.modules:scala-collection-compat_2.12:2.10.0 - http://www.scala-lang.org/)
(Apache-2.0) scala-java8-compat (org.scala-lang.modules:scala-java8-compat_2.12:1.0.2 - http://www.scala-lang.org/)
(MIT License) SLF4J API Module (org.slf4j:slf4j-api:2.0.4 - http://www.slf4j.org)
(MIT License) SLF4J NOP Binding (org.slf4j:slf4j-nop:2.0.4 - http://www.slf4j.org)
diff --git a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/RecordDispatcherImpl.java b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/RecordDispatcherImpl.java
index b62604d0e9..0f9b465911 100644
--- a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/RecordDispatcherImpl.java
+++ b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/RecordDispatcherImpl.java
@@ -40,6 +40,7 @@
import io.vertx.core.Vertx;
import io.vertx.core.buffer.Buffer;
import io.vertx.ext.web.client.HttpResponse;
+import java.nio.ByteBuffer;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
@@ -111,6 +112,7 @@ public RecordDispatcherImpl(
final RecordDispatcherListener recordDispatcherListener,
final ConsumerTracer consumerTracer,
final MeterRegistry meterRegistry) {
+
Objects.requireNonNull(consumerVerticleContext, "provide consumerVerticleContext");
Objects.requireNonNull(filter, "provide filter");
Objects.requireNonNull(subscriberSender, "provide subscriberSender");
@@ -362,7 +364,7 @@ private ConsumerRecordContext maybeDeserializeValueFromHeaders(ConsumerRecordCon
// headers even though the record is a valid CloudEvent.
logDebug("Value is null", recordContext.getRecord());
final var value = cloudEventDeserializer.deserialize(
- recordContext.getRecord().topic(), recordContext.getRecord().headers(), null);
+ recordContext.getRecord().topic(), recordContext.getRecord().headers(), ByteBuffer.wrap(null));
recordContext.setRecord(KafkaConsumerRecordUtils.copyRecordAssigningValue(recordContext.getRecord(), value));
return recordContext;
}
diff --git a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/CloudEventDeserializer.java b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/CloudEventDeserializer.java
index 3cbdb0ea7b..a46c529229 100644
--- a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/CloudEventDeserializer.java
+++ b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/CloudEventDeserializer.java
@@ -17,6 +17,7 @@
package dev.knative.eventing.kafka.broker.dispatcher.impl.consumer;
import io.cloudevents.CloudEvent;
+import java.nio.ByteBuffer;
import java.util.Map;
import org.apache.kafka.common.header.Headers;
import org.apache.kafka.common.serialization.Deserializer;
@@ -79,6 +80,20 @@ public CloudEvent deserialize(final String topic, final Headers headers, byte[]
}
}
+ /**
+ * Deserialize a record value from a byte buffer into a CloudEvent.
+ *
+ * @param topic topic associated with the data
+ * @param headers headers associated with the record; may be empty.
+ * @param data byte buffer; may be null;
+ * implementations are recommended to handle null by returning a value or null rather than throwing an exception.
+ * @return deserialized typed data; may be null
+ */
+ @Override
+ public CloudEvent deserialize(final String topic, final Headers headers, ByteBuffer data) {
+ return this.deserialize(topic, headers, data.array());
+ }
+
@Override
public void close() {
internalDeserializer.close();
diff --git a/data-plane/pom.xml b/data-plane/pom.xml
index 09512c95fa..1501faac2e 100644
--- a/data-plane/pom.xml
+++ b/data-plane/pom.xml
@@ -58,7 +58,7 @@
5.9.1
4.8.0
6.7.2
- 3.2.3
+ 3.6.0
1.9.6.Final
3.3.2
3.2.6.Final