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

Move on to quarkus apicurio/kafka 2.0 #323

Merged
merged 1 commit into from
Oct 29, 2021
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
53 changes: 14 additions & 39 deletions examples/kafka-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<artifactId>examples-kafka-registry</artifactId>
<name>Quarkus - Test Framework - Examples - Kafka with Registry</name>
<properties>
<apicurio-registry-utils-serde.version>1.3.2.Final</apicurio-registry-utils-serde.version>
<confluent.kafka-avro-serializer.version>6.2.1</confluent.kafka-avro-serializer.version>
<quarkiverse.apicurio.registry.client.version>0.0.2</quarkiverse.apicurio.registry.client.version>
</properties>

<dependencies>
Expand All @@ -25,32 +23,21 @@
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${confluent.kafka-avro-serializer.version}</version>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-apicurio-registry-avro</artifactId>
</dependency>
<!-- Quarkus extension for generating Java code from Avro schemas -->
<!-- with this, you don't have to use avro-maven-plugin -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-avro</artifactId>
</dependency>
<!-- Confluent AVRO libraries -->
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-utils-serde</artifactId>
<version>${apicurio-registry-utils-serde.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- quarkiverse-apicurio-registry-client: native mode dependency -->
<dependency>
<groupId>io.quarkiverse.apicurio</groupId>
<artifactId>quarkiverse-apicurio-registry-client</artifactId>
<version>${quarkiverse.apicurio.registry.client.version}</version>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${confluent.kafka-avro-serializer.version}</version>
</dependency>
<!-- quarkiverse-apicurio-registry-client: native mode dependency end-->
<dependency>
<groupId>io.quarkus.qe</groupId>
<artifactId>quarkus-test-containers</artifactId>
Expand All @@ -71,6 +58,11 @@
<artifactId>quarkus-test-service-kafka</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -82,28 +74,11 @@
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.10.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>src/main/avro</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
<stringType>String</stringType>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@QuarkusScenario
public class StrimziKafkaWithRegistryMessagingIT {

@KafkaContainer(vendor = KafkaVendor.STRIMZI, withRegistry = true)
@KafkaContainer(vendor = KafkaVendor.STRIMZI, withRegistry = true, registryPath = "/apis/registry/v2")
static final KafkaService kafka = new KafkaService();

@QuarkusApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ mp.messaging.connector.smallrye-kafka.apicurio.registry.url=${strimzi.registry.u
mp.messaging.outgoing.source-stock-price.connector=smallrye-kafka
mp.messaging.outgoing.source-stock-price.schema.registry.url=${strimzi.registry.url}
mp.messaging.outgoing.source-stock-price.topic=stock-price
mp.messaging.outgoing.source-stock-price.value.serializer=io.apicurio.registry.utils.serde.AvroKafkaSerializer
mp.messaging.outgoing.source-stock-price.apicurio.registry.artifact-id=io.apicurio.registry.utils.serde.strategy.SimpleTopicIdStrategy
mp.messaging.outgoing.source-stock-price.apicurio.registry.global-id=io.apicurio.registry.utils.serde.strategy.GetOrCreateIdStrategy
mp.messaging.outgoing.source-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.utils.serde.avro.ReflectAvroDatumProvider
mp.messaging.outgoing.source-stock-price.value.serializer=io.apicurio.registry.serde.avro.AvroKafkaSerializer
mp.messaging.outgoing.source-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.serde.avro.ReflectAvroDatumProvider
mp.messaging.outgoing.source-stock-price.apicurio.registry.auto-register=true

mp.messaging.incoming.channel-stock-price.connector=smallrye-kafka
mp.messaging.incoming.channel-stock-price.schema.registry.url=${strimzi.registry.url}
mp.messaging.incoming.channel-stock-price.specific.avro.reader=true
mp.messaging.incoming.channel-stock-price.topic=stock-price
mp.messaging.incoming.channel-stock-price.value.deserializer=io.apicurio.registry.utils.serde.AvroKafkaDeserializer
mp.messaging.incoming.channel-stock-price.auto.offset.reset=earliest
mp.messaging.incoming.channel-stock-price.enable.auto.commit=true
mp.messaging.incoming.channel-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.utils.serde.avro.ReflectAvroDatumProvider
mp.messaging.incoming.channel-stock-price.value.deserializer=io.apicurio.registry.serde.avro.AvroKafkaDeserializer
mp.messaging.incoming.channel-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.serde.avro.ReflectAvroDatumProvider

mp.messaging.outgoing.sink-stock-price.connector=smallrye-kafka
mp.messaging.outgoing.sink-stock-price.schema.registry.url=${strimzi.registry.url}
mp.messaging.outgoing.sink-stock-price.topic=end-stock-price
mp.messaging.outgoing.sink-stock-price.value.serializer=io.apicurio.registry.utils.serde.AvroKafkaSerializer
mp.messaging.outgoing.sink-stock-price.apicurio.registry.artifact-id=io.apicurio.registry.utils.serde.strategy.SimpleTopicIdStrategy
mp.messaging.outgoing.sink-stock-price.apicurio.registry.global-id=io.apicurio.registry.utils.serde.strategy.GetOrCreateIdStrategy
mp.messaging.outgoing.sink-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.utils.serde.avro.ReflectAvroDatumProvider
mp.messaging.outgoing.sink-stock-price.value.serializer=io.apicurio.registry.serde.avro.AvroKafkaSerializer
mp.messaging.outgoing.sink-stock-price.apicurio.registry.avro-datum-provider=io.apicurio.registry.serde.avro.ReflectAvroDatumProvider