Data Index as a Quarkus Development service
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow</artifactId>
</dependency>
When you start your Quarkus project in development mode, an in-memory instance of the Data Index service is automatically started in the background. This feature is enabled by Quarkus Dev Services, and leverages Testcontainers to start an image of the Data Index service.
The SonataFlow Process Quarkus extension sets up your Quarkus application to automatically replicate any SonataFlow messaging events related to workflow instances or jobs into the provisioned Data Index instance.
Once the service is up and running, you can query the GraphQL interface directly using http://localhost:8180/graphql
or using the Quarkus Dev UI console http://localhost:8080/q/dev
.
The Data Index GraphQL endpoint can query for ProcessInstances
and Jobs
. For more information about operations and attributes to query, see GraphQL endpoint provided by Data Index section.
You can share the same Data Index instance across multiple SonataFlow services during development. Sharing Data Index instances is enabled by default, therefore, only one Data Index instance is started. This behavior can be adjusted to start multiple instances using the quarkus.kogito.devservices.shared
property.
The Quarkus Dev Service also allows further configuration options including:
-
To disable Data Index Dev Service, use the
quarkus.kogito.devservices.enabled=false
property. -
To change the port where the Data Index Dev Service runs, use the
quarkus.kogito.devservices.port=8180
property. -
To adjust the provisioned image, use
quarkus.kogito.devservices.imageName=quay.io/kiegroup/kogito-data-index-ephemeral
property. -
To disable sharing the Data Index instance across multiple Quarkus applications, use
quarkus.kogito.devservices.shared=false
property.
For more information about Quarkus Dev Services, see Dev Services guide.
Data Index service configuration properties
The following table serves as a quick reference for commonly Data Index configuration properties supported.
Property | Description | Type | Default value | Override at runtime |
---|---|---|---|---|
|
The datasource URL |
string |
Yes |
|
|
The datasource username |
string |
Yes |
|
|
The datasource password |
string |
Yes |
|
|
The kind of database to connect: |
string |
Yes |
|
|
|
boolean |
false |
Yes |
|
(Only when referencing an image distribution) Allows to change the event connection type. The possible values are:
|
string |
|
Yes |
|
Defines timeout for a query execution. |
long |
|
Yes |
|
Enables or disables the Dev Services for workflows. By default, the Dev Services are enabled, unless an existing configuration is present. |
boolean |
|
No |
|
Defines the optional fixed port that the Dev Services listen to. |
int |
|
No |
|
Defines the Data Index image to use in Dev Service. |
string |
|
No |
|
Indicates if the Data Index instance, which is managed by Quarkus Dev Services, is shared. |
boolean |
|
No |
|
Defines the value of the label that is attached to the started container. This property is used when |
string |
|
No |
Found an issue?
If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!