Skip to content

Instantly share code, notes, and snippets.

@debu999
Last active February 15, 2023 09:18
Show Gist options
  • Save debu999/b3095db78dfff9f74bbfc198be99b9e9 to your computer and use it in GitHub Desktop.
Save debu999/b3095db78dfff9f74bbfc198be99b9e9 to your computer and use it in GitHub Desktop.
quarkus.application.name=kogito-dataindex
quarkus.devservices.enabled=false
quarkus.live-reload.instrumentation=true
quarkus.http.cors=true
quarkus.http.cores.origins=*
quarkus.jacoco.data-file=jacoco.exec
quarkus.jacoco.reports=true
quarkus.http.port=8180
kogito.apps.persistence.type=mongodb
kogito.persistence.optimistic.lock=true
kogito.persistence.type=mongodb
kogito.persistence.transaction.enabled=true
kogito.events.jobs.enabled=false
quarkus.mongodb.read-timeout=300000
quarkus.mongodb.connection-string=mongodb+srv://zzz:[email protected]/?retryWrites=true&w=majority
quarkus.mongodb.database=dataindexdb
kogito.events.database=dataindexdb
quarkus.mongodb.metrics.enabled=true
quarkus.mongodb.health.enabled=true
quarkus.smallrye-health.ui.always-include=true
quarkus.health.openapi.included=true
quarkus.kafka.health.enabled=true
quarkus.smallrye-graphql.ui.enable=true
quarkus.smallrye-graphql.ui.always-include=true
quarkus.smallrye-graphql.schema-include-scalars=true
quarkus.log.level=INFO
quarkus.log.min-level=INFO
quarkus.vertx.warning-exception-time=60S
quarkus.vertx.max-event-loop-execute-time=60S
quarkus.swagger-ui.always-include=true
mp.messaging.connector.smallrye-kafka.bootstrap.servers=localhost:9091,localhost:9092,localhost:9093
//needed for health APIs
kafka.bootstrap.servers=${mp.messaging.connector.smallrye-kafka.bootstrap.servers}
//incoming channels details
mp.messaging.incoming.kogito-processinstances-events.connector=smallrye-kafka
mp.messaging.incoming.kogito-processinstances-events.enable.auto.commit=false
mp.messaging.incoming.kogito-processinstances-events.auto.offset.reset=earliest
mp.messaging.incoming.kogito-processinstances-events.isolation.level=read_commited
mp.messaging.incoming.kogito-processinstances-events.waitForWriteCompletion=false
mp.messaging.incoming.kogito-processinstances-events.value.deserializer=com.example.ProcessInstanceDataEventDeserializer
mp.messaging.incoming.kogito-processinstances-events.topic=kogito-processinstances-events
mp.messaging.incoming.kogito-processinstances-events.group.id=kogito-processinstances-events-gid
mp.messaging.incoming.kogito-usertaskinstances-events.connector=smallrye-kafka
mp.messaging.incoming.kogito-usertaskinstances-events.enable.auto.commit=false
mp.messaging.incoming.kogito-usertaskinstances-events.auto.offset.reset=earliest
mp.messaging.incoming.kogito-usertaskinstances-events.isolation.level=read_commited
mp.messaging.incoming.kogito-usertaskinstances-events.waitForWriteCompletion=false
mp.messaging.incoming.kogito-usertaskinstances-events.value.deserializer=com.example.UserTaskInstanceDataEventDeserializer
mp.messaging.incoming.kogito-usertaskinstances-events.topic=kogito-usertaskinstances-events
mp.messaging.incoming.kogito-processinstances-events.group.id=kogito-usertaskinstances-events-gid
mp.messaging.incoming.kogito-deadline-consumer.connector=smallrye-kafka
mp.messaging.incoming.kogito-deadline-consumer.enable.auto.commit=false
mp.messaging.incoming.kogito-deadline-consumer.auto.offset.reset=earliest
mp.messaging.incoming.kogito-deadline-consumer.isolation.level=read_commited
mp.messaging.incoming.kogito-deadline-consumer.waitForWriteCompletion=false
mp.messaging.incoming.kogito-deadline-consumer.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.incoming.kogito-deadline-consumer.topic=kogito-deadline-events
mp.messaging.incoming.kogito-deadline-consumer.group.id=kogito-deadline-events-gid
mp.messaging.incoming.kogito-jobs-events.connector=smallrye-kafka
mp.messaging.incoming.kogito-jobs-events.enable.auto.commit=false
mp.messaging.incoming.kogito-jobs-events.auto.offset.reset=earliest
mp.messaging.incoming.kogito-jobs-events.isolation.level=read_commited
mp.messaging.incoming.kogito-jobs-events.waitForWriteCompletion=false
mp.messaging.incoming.kogito-jobs-events.value.deserializer=com.example.KogitoJobCloudEventDeserializer
mp.messaging.incoming.kogito-jobs-events.topic=kogito-jobs-events
mp.messaging.incoming.kogito-jobs-events.group.id=kogito-jobs-events-gid
kogito.service.url=http://localhost:8080/
kogito.jobs-service.url=http://localhost:8081/
quarkus.opentelemetry.enabled=true
quarkus.opentelemetry.propagatores=b3,b3multi,baggage,jaegar,ottrace,tracecontext
quarkus.opentelemetry.tracer.enabled=true
quarkus.opentelemetry.tracer.suppress-non-application-uris=false
quarkus.opentelemetry.tracer.exporter.otlp.enabled=true
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0<modelVersion>
<groupId>com.example</groupId>
<artifactId>kogito-dataindex</artifactId>
<version>1.0.0</version>
<name>kogito-dataindex</name>
<properties>
<compiler-plugin.version>3.10.1</compiler-plugin.version>
<java.version>17</java.version>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.version>2.16.0.Final</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jacoco.version>0.8.8</jacoco.version>
<lombok.version>1.18.24</lombok.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
<mapstruct.version>1.5.3.Final</mapstruct.version>
<skipITs>true</skipITs>
<kogito.build.version>1.33.0.Final</kogito.build.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-kogito-bom</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>${jacoco.version}</version>
<classifier>runtime</classifier>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Data Index Dependencies -->
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-service-common</artifactId>
<version>${kogito.build.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-storage-mongodb</artifactId>
<version>${kogito.build.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-service-common</artifactId>
<version>${kogito.build.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
<artifactId>json-unit-assertj</artifactId>
<version>2.36.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
<version>${kogito.build.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-reactive-messaging-in-memory</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.0</version>
<scope>test</scope>
</dependency>
<!-- LOMBOK -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<!-- OIDC -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc-client-reactive-filter</artifactId>
</dependency>
<!-- GRAPHQL -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-graphql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-graphql-client</artifactId>
</dependency>
<!-- HEALTH -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<!-- OPEN API -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<!-- OPEN TELEMETRY -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-extension-trace-propagators</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
</dependency>
<!-- TEST LIBRARIES -->
<!-- JACOCO -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jacoco</artifactId>
</dependency>
<!-- Easy Random -->
<dependency>
<groupId>org.jeasy</groupId>
<artifactId>easy-random-core</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<exclClassLoaders>*QuarkusClassLoader</exclClassLoaders>
<destFile>${project.build.directory}/jacoco.exec</destFile>
<append>true</append>
</configuration>
</execution>
<execution>
<id>default-prepare-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<exclClassLoaders>*QuarkusClassLoader</exclClassLoaders>
<destFile>${project.build.directory}/jacoco.exec</destFile>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<skipITs>false</skipITs>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
package com.example.codecs;
import io.quarkus.kafka.client.serialization.ObjectMapperDeserializer;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
public class ProcessInstanceDataEventDeserializer extends ObjectMapperDeserializer<ProcessInstanceDataEvent> {
public ProcessInstanceDataEventDeserializer() {
super(ProcessInstanceDataEvent.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment