This is an automated email from the ASF dual-hosted git repository.

zixuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-adapters.git


The following commit(s) were added to refs/heads/master by this push:
     new 4092d48  Issues/23555 (#57)
4092d48 is described below

commit 4092d48e7102d62b694c684e2308947143c36298
Author: VisionXu <vis...@outlook.com>
AuthorDate: Thu Nov 14 15:38:00 2024 +0800

    Issues/23555 (#57)
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    Upgrade Pulsar to 3.0.7
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - Use `jdk17`
    - Upgrade `maven-shade-plugin` to support `jdk17`
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - Fix UT
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - Fix UT
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - remove useless variable
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - Use jdk8
    
    * Fix issue: https://github.com/apache/pulsar/issues/23555.
    - Remove useless property
---
 .github/workflows/integration-test.yaml                      | 12 ++++++------
 README.md                                                    |  4 ++--
 examples/kafka-streams/pom.xml                               |  4 ++--
 examples/pom.xml                                             |  2 +-
 examples/spark/pom.xml                                       |  2 +-
 pom.xml                                                      |  6 +++---
 pulsar-client-kafka-compat/pom.xml                           |  2 +-
 .../pulsar-client-kafka-shaded/pom.xml                       |  2 +-
 .../pulsar-client-kafka-shaded_0_8/pom.xml                   |  2 +-
 .../pulsar-client-kafka-shaded_0_9/pom.xml                   |  2 +-
 pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml |  7 ++++++-
 .../pulsar-client-kafka-tests_0_8/pom.xml                    |  7 ++++++-
 .../pulsar-client-kafka-tests_0_9/pom.xml                    |  7 ++++++-
 pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml       |  2 +-
 .../apache/kafka/clients/consumer/PulsarKafkaConsumer.java   |  3 ++-
 .../kafka/clients/producer/PulsarKafkaProducerTest.java      |  2 +-
 pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml   |  7 ++++++-
 pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml   |  2 +-
 .../apache/kafka/clients/consumer/PulsarKafkaConsumer.java   |  3 ++-
 .../kafka/clients/producer/PulsarKafkaProducerTest.java      |  2 +-
 pulsar-log4j2-appender/pom.xml                               |  2 +-
 pulsar-spark/pom.xml                                         |  2 +-
 pulsar-storm/pom.xml                                         |  2 +-
 .../src/main/java/org/apache/pulsar/storm/PulsarBolt.java    |  4 +---
 .../src/main/java/org/apache/pulsar/storm/PulsarSpout.java   |  2 +-
 tests/pom.xml                                                |  2 +-
 tests/pulsar-kafka-compat-client-test/pom.xml                |  2 +-
 tests/pulsar-spark-test/pom.xml                              |  4 ++--
 tests/pulsar-storm-test/pom.xml                              |  9 +++++++--
 29 files changed, 67 insertions(+), 42 deletions(-)

diff --git a/.github/workflows/integration-test.yaml 
b/.github/workflows/integration-test.yaml
index b6616c0..9daee75 100644
--- a/.github/workflows/integration-test.yaml
+++ b/.github/workflows/integration-test.yaml
@@ -71,21 +71,21 @@ jobs:
           distribution: 'adopt'
           java-version: 17
 
-      - name: install org.apache.pulsar.tests:integration:jar:tests:2.11.0
+      - name: install org.apache.pulsar.tests:integration:jar:tests:3.0.7
         if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
         run: |
           cd ~
-          git clone --depth 50 --single-branch --branch v2.11.0  
https://github.com/apache/pulsar
+          git clone --depth 50 --single-branch --branch v3.0.7  
https://github.com/apache/pulsar
           cd pulsar
           mvn -B -ntp -f tests/pom.xml -pl 
org.apache.pulsar.tests:tests-parent,org.apache.pulsar.tests:integration install
 
       - name: build apachepulsar/pulsar-test-latest-version:latest
         if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
         run: |
-          docker pull apachepulsar/pulsar-all:2.11.0
-          docker pull apachepulsar/pulsar:2.11.0
-          docker tag apachepulsar/pulsar-all:2.11.0 
apachepulsar/pulsar-all:latest
-          docker tag apachepulsar/pulsar:2.11.0 apachepulsar/pulsar:latest
+          docker pull apachepulsar/pulsar-all:3.0.7
+          docker pull apachepulsar/pulsar:3.0.7
+          docker tag apachepulsar/pulsar-all:3.0.7 
apachepulsar/pulsar-all:latest
+          docker tag apachepulsar/pulsar:3.0.7 apachepulsar/pulsar:latest
           cd ~/pulsar
           mvn -B -ntp -f tests/docker-images/pom.xml install -pl 
org.apache.pulsar.tests:latest-version-image -am -Pdocker,-main -DskipTests
 
diff --git a/README.md b/README.md
index ce62338..7ebe364 100644
--- a/README.md
+++ b/README.md
@@ -34,11 +34,11 @@ mvn install
 In order to build this repository the linked Pulsar release must be released 
to Maven Central
 other wise you have to build it locally.
 
-For instance if this code depends on Pulsar 2.11.0 you have to build Pulsar 
2.11.0 locally
+For instance if this code depends on Pulsar 3.0.7 you have to build Pulsar 
3.0.7 locally
 
 ```
 git clone https://github.com/apache/pulsar
-git checkout v2.11.0
+git checkout v3.0.7
 mvn clean install -DskipTests
 ```
 
diff --git a/examples/kafka-streams/pom.xml b/examples/kafka-streams/pom.xml
index 8d29916..3817185 100644
--- a/examples/kafka-streams/pom.xml
+++ b/examples/kafka-streams/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.pulsar.examples</groupId>
         <artifactId>pulsar-adapters-examples</artifactId>
-        <version>2.11.0-SNAPSHOT</version>
+        <version>3.0.7</version>
     </parent>
 
     <artifactId>kafka-streams</artifactId>
@@ -35,7 +35,7 @@
     <dependency>
       <groupId>org.apache.pulsar</groupId>
       <artifactId>pulsar-client-kafka</artifactId>
-      <version>2.11.0-SNAPSHOT</version>
+      <version>3.0.7</version>
     </dependency>
 
     <!-- Apache Kafka dependencies -->
diff --git a/examples/pom.xml b/examples/pom.xml
index b756c2e..ed17a82 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
   </parent>
 
   <groupId>org.apache.pulsar.examples</groupId>
diff --git a/examples/spark/pom.xml b/examples/spark/pom.xml
index 667373a..f59d037 100644
--- a/examples/spark/pom.xml
+++ b/examples/spark/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.pulsar.examples</groupId>
     <artifactId>pulsar-adapters-examples</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
   </parent>
 
   <artifactId>spark</artifactId>
diff --git a/pom.xml b/pom.xml
index 4f240d1..0f2cca6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
   <groupId>org.apache.pulsar</groupId>
   <artifactId>pulsar-adapters</artifactId>
 
-  <version>2.11.0-SNAPSHOT</version>
+  <version>3.0.7</version>
 
   <name>Pulsar Adapters</name>
   <description>A collections of Pulsar adapters.</description>
@@ -76,7 +76,7 @@
   </issueManagement>
 
   <properties>
-    <pulsar.version>2.11.0</pulsar.version>
+    <pulsar.version>3.0.7</pulsar.version>
     <kafka-client.version>2.7.2</kafka-client.version>
     <storm.version>2.0.0</storm.version>
     <kafka_0_8.version>0.8.1.1</kafka_0_8.version>
@@ -123,7 +123,7 @@
     <surefire.version>3.0.0-M3</surefire.version>
     <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
     <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
-    <maven-shade-plugin>3.2.4</maven-shade-plugin>
+    <maven-shade-plugin>3.4.1</maven-shade-plugin>
     <maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
     <nifi-nar-maven-plugin.version>1.2.0</nifi-nar-maven-plugin.version>
     <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
diff --git a/pulsar-client-kafka-compat/pom.xml 
b/pulsar-client-kafka-compat/pom.xml
index d2c8b8a..5c965cf 100644
--- a/pulsar-client-kafka-compat/pom.xml
+++ b/pulsar-client-kafka-compat/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
index 5d47d53..3be6ef6 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml
index c04a999..22d68f9 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_8/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml
index e100d8e..5c935dd 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded_0_9/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
index 6f90950..9bbef89 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -36,6 +36,11 @@
 
   <description>Tests to verify the correct shading configuration for the 
pulsar-client-kafka wrapper</description>
 
+  <properties>
+    <maven.compiler.source>17</maven.compiler.source>
+    <maven.compiler.target>17</maven.compiler.target>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
index 8e3246d..09117d9 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -36,6 +36,11 @@
 
   <description>Tests to verify the correct shading configuration for the 
pulsar-client-kafka wrapper</description>
 
+  <properties>
+    <maven.compiler.source>17</maven.compiler.source>
+    <maven.compiler.target>17</maven.compiler.target>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
index 948ff0d..340eeab 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -36,6 +36,11 @@
 
   <description>Tests to verify the correct shading configuration for the 
pulsar-client-kafka wrapper</description>
 
+  <properties>
+    <maven.compiler.source>17</maven.compiler.source>
+    <maven.compiler.target>17</maven.compiler.target>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml
index 8667697..6b01afd 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git 
a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
 
b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
index 83fb86a..67d052b 100644
--- 
a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
+++ 
b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
@@ -261,7 +261,8 @@ public class PulsarKafkaConsumer<K, V> implements 
Consumer<K, V>, MessageListene
             for (String topic : topics) {
                 // Create individual subscription on each partition, that way 
we can keep using the
                 // acknowledgeCumulative()
-                int numberOfPartitions = ((PulsarClientImpl) 
client).getNumberOfPartitions(topic).get();
+                int numberOfPartitions = ((PulsarClientImpl) 
client).getPartitionedTopicMetadata(topic, true, false)
+                        .thenApply(metadata -> metadata.partitions).get();
 
                 ConsumerBuilder<byte[]> consumerBuilder = 
PulsarConsumerKafkaConfig.getConsumerBuilder(client, properties);
                 consumerBuilder.subscriptionType(SubscriptionType.Failover);
diff --git 
a/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
 
b/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
index b4a7e79..4fb58a2 100644
--- 
a/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
+++ 
b/pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
@@ -96,7 +96,7 @@ public class PulsarKafkaProducerTest {
     @ObjectFactory
     // Necessary to make PowerMockito.mockStatic work with TestNG.
     public IObjectFactory getObjectFactory() {
-        return new org.powermock.modules.testng.PowerMockObjectFactory();
+        return new 
org.powermock.modules.testng.internal.PowerMockClassloaderObjectFactory();
     }
 
     @Test
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
index 03557b1..9747e8e 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -36,6 +36,11 @@
 
   <description>Kafka client library that publishes and consumes messages on 
Pulsar topics</description>
 
+  <properties>
+    <maven.compiler.source>17</maven.compiler.source>
+    <maven.compiler.target>17</maven.compiler.target>
+  </properties>
+
   <dependencies>
 
      <dependency>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml
index c4e9b15..5315723 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-client-kafka-compat</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git 
a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
index 0a3526b..0f65107 100644
--- 
a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
+++ 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java
@@ -212,7 +212,8 @@ public class PulsarKafkaConsumer<K, V> implements 
Consumer<K, V>, MessageListene
             for (String topic : topics) {
                 // Create individual subscription on each partition, that way 
we can keep using the
                 // acknowledgeCumulative()
-                int numberOfPartitions = ((PulsarClientImpl) 
client).getNumberOfPartitions(topic).get();
+                int numberOfPartitions = ((PulsarClientImpl) 
client).getPartitionedTopicMetadata(topic, true, false)
+                        .thenApply(metadata -> metadata.partitions).get();
 
                 ConsumerBuilder<byte[]> consumerBuilder = 
PulsarConsumerKafkaConfig.getConsumerBuilder(client, properties);
                 consumerBuilder.subscriptionType(SubscriptionType.Failover);
diff --git 
a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
index 4d12418..727113e 100644
--- 
a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
+++ 
b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java
@@ -87,7 +87,7 @@ public class PulsarKafkaProducerTest {
     @ObjectFactory
     // Necessary to make PowerMockito.mockStatic work with TestNG.
     public IObjectFactory getObjectFactory() {
-        return new org.powermock.modules.testng.PowerMockObjectFactory();
+        return new 
org.powermock.modules.testng.internal.PowerMockClassloaderObjectFactory();
     }
 
     @Test
diff --git a/pulsar-log4j2-appender/pom.xml b/pulsar-log4j2-appender/pom.xml
index b55fca7..09f54d7 100644
--- a/pulsar-log4j2-appender/pom.xml
+++ b/pulsar-log4j2-appender/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-spark/pom.xml b/pulsar-spark/pom.xml
index f10b167..a6bd89e 100644
--- a/pulsar-spark/pom.xml
+++ b/pulsar-spark/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-storm/pom.xml b/pulsar-storm/pom.xml
index a20649b..4fad85e 100644
--- a/pulsar-storm/pom.xml
+++ b/pulsar-storm/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
     <relativePath>..</relativePath>
   </parent>
 
diff --git a/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarBolt.java 
b/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarBolt.java
index 32fa78f..8b4fd86 100644
--- a/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarBolt.java
+++ b/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarBolt.java
@@ -128,8 +128,6 @@ public class PulsarBolt extends BaseRichBolt implements 
IMetric {
                     }
                     collector.ack(input);
                 } else {
-                    final long messageSizeToBeSent = 
((TypedMessageBuilderImpl<byte[]>) msgBuilder).getContent()
-                            .remaining();
                     msgBuilder.sendAsync().handle((msgId, ex) -> {
                         synchronized (collector) {
                             if (ex != null) {
@@ -140,7 +138,7 @@ public class PulsarBolt extends BaseRichBolt implements 
IMetric {
                             } else {
                                 collector.ack(input);
                                 ++messagesSent;
-                                messageSizeSent += messageSizeToBeSent;
+                                messageSizeSent += 
((TypedMessageBuilderImpl<byte[]>) msgBuilder).getContent().remaining();
                                 if (LOG.isDebugEnabled()) {
                                     LOG.debug("[{}] Message sent with id {}", 
boltId, msgId);
                                 }
diff --git 
a/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarSpout.java 
b/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarSpout.java
index 8ed090e..797f340 100644
--- a/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarSpout.java
+++ b/pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarSpout.java
@@ -39,7 +39,7 @@ import org.apache.pulsar.client.api.MessageId;
 import org.apache.pulsar.client.api.PulsarClient;
 import org.apache.pulsar.client.api.PulsarClientException;
 import org.apache.pulsar.client.api.Reader;
-import org.apache.pulsar.client.impl.Backoff;
+import org.apache.pulsar.common.util.Backoff;
 import org.apache.pulsar.client.impl.ClientBuilderImpl;
 import org.apache.pulsar.client.impl.conf.ClientConfigurationData;
 import org.apache.pulsar.client.impl.conf.ConsumerConfigurationData;
diff --git a/tests/pom.xml b/tests/pom.xml
index 18ccb15..7d4b68d 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.pulsar</groupId>
     <artifactId>pulsar-adapters</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
   </parent>
   <groupId>org.apache.pulsar.tests</groupId>
   <artifactId>adapters-tests-parent</artifactId>
diff --git a/tests/pulsar-kafka-compat-client-test/pom.xml 
b/tests/pulsar-kafka-compat-client-test/pom.xml
index 1a9095c..c3593ed 100644
--- a/tests/pulsar-kafka-compat-client-test/pom.xml
+++ b/tests/pulsar-kafka-compat-client-test/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.pulsar.tests</groupId>
     <artifactId>adapters-tests-parent</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
   </parent>
 
   <artifactId>pulsar-kafka-compat-client-test</artifactId>
diff --git a/tests/pulsar-spark-test/pom.xml b/tests/pulsar-spark-test/pom.xml
index 7078978..8346d77 100644
--- a/tests/pulsar-spark-test/pom.xml
+++ b/tests/pulsar-spark-test/pom.xml
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.apache.pulsar.tests</groupId>
         <artifactId>adapters-tests-parent</artifactId>
-        <version>2.11.0-SNAPSHOT</version>
+        <version>3.0.7</version>
     </parent>
 
     <artifactId>pulsar-spark-test</artifactId>
@@ -41,7 +41,7 @@
         <dependency>
           <groupId>org.apache.pulsar</groupId>
           <artifactId>pulsar-spark</artifactId>
-            <version>2.11.0-SNAPSHOT</version>
+            <version>3.0.7</version>
           <scope>test</scope>
         </dependency>
 
diff --git a/tests/pulsar-storm-test/pom.xml b/tests/pulsar-storm-test/pom.xml
index 3134328..f93defc 100644
--- a/tests/pulsar-storm-test/pom.xml
+++ b/tests/pulsar-storm-test/pom.xml
@@ -26,19 +26,24 @@
   <parent>
     <groupId>org.apache.pulsar.tests</groupId>
     <artifactId>adapters-tests-parent</artifactId>
-    <version>2.11.0-SNAPSHOT</version>
+    <version>3.0.7</version>
   </parent>
 
   <artifactId>pulsar-storm-test</artifactId>
   <packaging>jar</packaging>
   <name>Pulsar Storm adapter Tests</name>
 
+  <properties>
+    <maven.compiler.source>17</maven.compiler.source>
+    <maven.compiler.target>17</maven.compiler.target>
+  </properties>
+
   <dependencies>
 
     <dependency>
       <groupId>org.apache.pulsar</groupId>
       <artifactId>pulsar-storm</artifactId>
-      <version>2.11.0-SNAPSHOT</version>
+      <version>3.0.7</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>

Reply via email to