diff --git a/pom.xml b/pom.xml
index bc1631b5..afd91b1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
2.9.0
1.2.0
1.4.0
- 8.1.17
- 0.17.0
+ 8.2.0
+ 0.18.0
0.8.1
1.8.20
diff --git a/src/main/kotlin/org/camunda/community/zeebe/play/connectors/ConnectorsConfig.kt b/src/main/kotlin/org/camunda/community/zeebe/play/connectors/ConnectorsConfig.kt
index 4f3fb2f0..a36ebcea 100644
--- a/src/main/kotlin/org/camunda/community/zeebe/play/connectors/ConnectorsConfig.kt
+++ b/src/main/kotlin/org/camunda/community/zeebe/play/connectors/ConnectorsConfig.kt
@@ -4,7 +4,6 @@ import io.camunda.connector.api.secret.SecretProvider
import io.camunda.connector.runtime.util.ConnectorHelper
import io.camunda.connector.runtime.util.outbound.ConnectorJobHandler
import io.camunda.zeebe.client.ZeebeClient
-import io.camunda.zeebe.spring.client.lifecycle.ZeebeClientLifecycle
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.domain.EntityScan
import org.springframework.boot.context.properties.EnableConfigurationProperties
@@ -28,13 +27,6 @@ class ConnectorsConfig(
@PostConstruct
fun startConnectors() {
- if (zeebeClient is ZeebeClientLifecycle) {
- // The connectors are managed by the Spring Zeebe client itself.
- // Currently, it is not possible to disable the connectors. See
- // https://github.com/camunda-community-hub/spring-zeebe/issues/325.
- return
- }
-
if (connectorProperties.mode == ConnectorProperties.ConnectorsMode.ACTIVE) {
// start all connectors
connectorService
diff --git a/src/main/kotlin/org/camunda/community/zeebe/play/zeebe/RemoteZeebeConfig.kt b/src/main/kotlin/org/camunda/community/zeebe/play/zeebe/RemoteZeebeConfig.kt
index 685324a5..8883cb43 100644
--- a/src/main/kotlin/org/camunda/community/zeebe/play/zeebe/RemoteZeebeConfig.kt
+++ b/src/main/kotlin/org/camunda/community/zeebe/play/zeebe/RemoteZeebeConfig.kt
@@ -3,10 +3,12 @@ package org.camunda.community.zeebe.play.zeebe
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.fasterxml.jackson.module.kotlin.readValue
-import io.camunda.zeebe.spring.client.EnableZeebeClient
+import io.camunda.zeebe.client.ZeebeClient
+import io.camunda.zeebe.spring.client.properties.ZeebeClientConfigurationProperties
import org.camunda.community.zeebe.play.rest.ZeebeServiceException
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
+import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import java.net.URI
@@ -18,7 +20,7 @@ import java.time.Instant
@Configuration
@ConditionalOnProperty(name = ["zeebe.engine"], havingValue = "remote")
-@EnableZeebeClient
+@EnableConfigurationProperties(ZeebeClientConfigurationProperties::class)
open class RemoteZeebeConfig {
@Value(value = "\${zeebe.clock.endpoint}")
@@ -29,6 +31,13 @@ open class RemoteZeebeConfig {
return RemoteZeebeService(zeebeClockEndpoint)
}
+ @Bean
+ fun zeebeClient(config: ZeebeClientConfigurationProperties): ZeebeClient {
+ // The Spring-Zeebe client is disabled (configuration issues with embedded engine).
+ // Create the Zeebe client directly using the configuration from Spring-Zeebe.
+ return ZeebeClient.newClient(config)
+ }
+
class RemoteZeebeService(val clockEndpoint: String) : ZeebeService {
private val httpClient = HttpClient.newHttpClient()
@@ -57,7 +66,8 @@ open class RemoteZeebeConfig {
override fun increaseTime(duration: Duration): Long {
val offsetMilli = duration.toMillis()
- val requestBody = HttpRequest.BodyPublishers.ofString("""{ "offsetMilli": $offsetMilli }""")
+ val requestBody =
+ HttpRequest.BodyPublishers.ofString("""{ "offsetMilli": $offsetMilli }""")
val clockResponse = sendRequest(
request = HttpRequest.newBuilder()
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8a4afa37..5fa1a9e3 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -7,10 +7,12 @@ zeebe:
engine: embedded
client:
-
broker.gatewayAddress: 127.0.0.1:26500
security.plaintext: true
+ # Disable the Zeebe-Spring client to avoid configuration issues with the embedded engine.
+ enabled: false
+
worker:
hazelcast:
connection: localhost:5701
diff --git a/src/test/kotlin/org/camunda/community/zeebe/play/ApplicationTests.kt b/src/test/kotlin/org/camunda/community/zeebe/play/ApplicationTests.kt
index 8094188f..9d95d3c3 100644
--- a/src/test/kotlin/org/camunda/community/zeebe/play/ApplicationTests.kt
+++ b/src/test/kotlin/org/camunda/community/zeebe/play/ApplicationTests.kt
@@ -17,7 +17,7 @@ class ApplicationTests(
@Test
fun `should start application`() {
- assertThat(mainView).isNotNull();
+ assertThat(mainView).isNotNull()
}
}