diff --git a/pulsar-client-kafka-compat/pom.xml b/pulsar-client-kafka-compat/pom.xml index e43d9426930de..c7e517c523723 100644 --- a/pulsar-client-kafka-compat/pom.xml +++ b/pulsar-client-kafka-compat/pom.xml @@ -38,6 +38,7 @@ pulsar-client-kafka + pulsar-client-kafka-shaded pulsar-client-kafka-tests diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml new file mode 100644 index 0000000000000..b1c1961c1b19b --- /dev/null +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml @@ -0,0 +1,196 @@ + + + + 4.0.0 + + + org.apache.pulsar + pulsar-client-kafka-compat + 2.0.0-incubating-SNAPSHOT + .. + + + pulsar-client-kafka + Pulsar Kafka compatibility :: API + + Drop-in replacement for Kafka client library that publishes and consumes + messages on Pulsar topics + + + 0.10.2.1 + + + + + ${project.groupId} + pulsar-client-kafka-original + ${project.version} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + true + true + + + org.apache.kafka:kafka-clients + org.apache.pulsar:pulsar-client-kafka-original + org.apache.pulsar:pulsar-client-original + org.apache.commons:commons-lang3 + commons-codec:commons-codec + commons-collections:commons-collections + org.asynchttpclient:* + io.netty:netty-codec-http + io.netty:netty-transport-native-epoll + org.reactivestreams:reactive-streams + com.typesafe.netty:netty-reactive-streams + org.javassist:javassist + com.google.protobuf:protobuf-java + com.google.guava:guava + com.google.code.gson:gson + com.fasterxml.jackson.core + io.netty:netty + io.netty:netty-all + org.apache.pulsar:pulsar-common + org.apache.bookkeeper:circe-checksum + net.jpountz.lz4:lz4 + com.yahoo.datasketches:sketches-core + org.apache.httpcomponents:httpclient + commons-logging:commons-logging + org.apache.httpcomponents:httpcore + + + + + commons-logging:commons-logging + + ** + + + + + + org.apache.kafka.clients.producer.KafkaProducer + org.apache.kafka.clients.producer.OriginalKafkaProducer + + + org.apache.kafka.clients.producer.PulsarKafkaProducer + org.apache.kafka.clients.producer.KafkaProducer + + + org.apache.kafka.clients.consumer.KafkaConsumer + org.apache.kafka.clients.consumer.OriginalKafkaConsumer + + + org.apache.kafka.clients.consumer.PulsarKafkaConsumer + org.apache.kafka.clients.consumer.KafkaConsumer + + + + + + org.asynchttpclient + org.apache.pulsar.shade.org.asynchttpclient + + + org.apache.commons + org.apache.pulsar.shade.org.apache.commons + + + com.google + org.apache.pulsar.shade.com.google + + + com.fasterxml.jackson + org.apache.pulsar.shade.com.fasterxml.jackson + + + io.netty + org.apache.pulsar.shade.io.netty + + + org.apache.pulsar.common + org.apache.pulsar.shade.org.apache.pulsar.common + + + org.apache.pulsar.policies + org.apache.pulsar.shade.org.apache.pulsar.policies + + + org.apache.pulsar.checksum + org.apache.pulsar.shade.org.apache.pulsar.checksum + + + com.scurrilous.circe + org.apache.pulsar.shade.com.scurrilous.circe + + + net.jpountz + org.apache.pulsar.shade.net.jpountz + + + com.yahoo.datasketches + org.apache.pulsar.shade.com.yahoo.datasketches + + + com.yahoo.sketches + org.apache.pulsar.shade.com.yahoo.sketches + + + org.apache.http + org.apache.pulsar.shade.org.apache.http + + + + + net.jpountz.lz4:lz4 + + ** + + + + org.apache.pulsar:pulsar-client-original + + ** + + + + + + + + + + diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml index 5c3ee5db54662..4426959b83e18 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml +++ b/pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml @@ -31,11 +31,10 @@ .. - pulsar-client-kafka - Pulsar Kafka compatibility :: API + pulsar-client-kafka-original + Pulsar Kafka compatibility :: API (original) - Drop-in replacement for Kafka client library that publishes and consumes - messages on Pulsar topics + Kafka client library that publishes and consumes messages on Pulsar topics @@ -84,147 +83,4 @@ - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - true - - - org.apache.kafka:kafka-clients - org.apache.pulsar:pulsar-client-original - org.apache.commons:commons-lang3 - commons-codec:commons-codec - commons-collections:commons-collections - org.asynchttpclient:* - io.netty:netty-codec-http - io.netty:netty-transport-native-epoll - org.reactivestreams:reactive-streams - com.typesafe.netty:netty-reactive-streams - org.javassist:javassist - com.google.protobuf:protobuf-java - com.google.guava:guava - com.google.code.gson:gson - com.fasterxml.jackson.core - io.netty:netty - io.netty:netty-all - org.apache.pulsar:pulsar-common - org.apache.bookkeeper:circe-checksum - net.jpountz.lz4:lz4 - com.yahoo.datasketches:sketches-core - org.apache.httpcomponents:httpclient - commons-logging:commons-logging - org.apache.httpcomponents:httpcore - - - - - commons-logging:commons-logging - - ** - - - - - - org.apache.kafka.clients.producer.KafkaProducer - org.apache.kafka.clients.producer.OriginalKafkaProducer - - - org.apache.kafka.clients.producer.PulsarKafkaProducer - org.apache.kafka.clients.producer.KafkaProducer - - - org.apache.kafka.clients.consumer.KafkaConsumer - org.apache.kafka.clients.consumer.OriginalKafkaConsumer - - - org.apache.kafka.clients.consumer.PulsarKafkaConsumer - org.apache.kafka.clients.consumer.KafkaConsumer - - - - - - org.asynchttpclient - org.apache.pulsar.shade.org.asynchttpclient - - - org.apache.commons - org.apache.pulsar.shade.org.apache.commons - - - com.google - org.apache.pulsar.shade.com.google - - - com.fasterxml.jackson - org.apache.pulsar.shade.com.fasterxml.jackson - - - io.netty - org.apache.pulsar.shade.io.netty - - - org.apache.pulsar.common - org.apache.pulsar.shade.org.apache.pulsar.common - - - org.apache.pulsar.policies - org.apache.pulsar.shade.org.apache.pulsar.policies - - - org.apache.pulsar.checksum - org.apache.pulsar.shade.org.apache.pulsar.checksum - - - com.scurrilous.circe - org.apache.pulsar.shade.com.scurrilous.circe - - - net.jpountz - org.apache.pulsar.shade.net.jpountz - - - com.yahoo.datasketches - org.apache.pulsar.shade.com.yahoo.datasketches - - - com.yahoo.sketches - org.apache.pulsar.shade.com.yahoo.sketches - - - org.apache.http - org.apache.pulsar.shade.org.apache.http - - - - - net.jpountz.lz4:lz4 - - ** - - - - org.apache.pulsar:pulsar-client-original - - ** - - - - - - - - - diff --git a/site/docs/latest/adaptors/KafkaWrapper.md b/site/docs/latest/adaptors/KafkaWrapper.md index 444cb0fec7aac..cfbeddbdd4b77 100644 --- a/site/docs/latest/adaptors/KafkaWrapper.md +++ b/site/docs/latest/adaptors/KafkaWrapper.md @@ -60,6 +60,23 @@ thing that needs to be adjusted is the configuration, to make sure to point the producers and consumers to Pulsar service rather than Kafka and to use a particular Pulsar topic. +## Using the Pulsar Kafka compatibility wrapper together with existing kafka client. + +When migrating from Kafka to Pulsar, the application might have to use the original kafka client +and the pulsar kafka wrapper together during migration. Then you should consider using the +unshaded pulsar kafka client wrapper. + +```xml + + org.apache.pulsar + pulsar-client-kafka-original + {{ site.current_version }} + +``` + +When using this dependency, you need to construct producer using `org.apache.kafka.clients.producer.PulsarKafkaProducer` +instead of `org.apache.kafka.clients.producer.KafkaProducer` and `org.apache.kafka.clients.producer.PulsarKafkaConsumer` for consumers. + ## Producer example ```java