How can I use the full ksqldb client api with gradle? Why are there 2 different packages?
repositories {
mavenCentral()
jcenter()
maven {
url "https://packages.confluent.io/maven/"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
compile group: 'io.confluent.ksql', name: 'ksqldb-api-client', version: '6.0.0'
}
I would like to reference v0.11.0. It contains more methods:
https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-clients/java-client/api/io/confluent/ksql/api/client/Client.html
https://docs.ksqldb.io/en/0.10.0-ksqldb/developer-guide/ksqldb-clients/java-client/api/io/confluent/ksql/api/client/Client.html
import io.confluent.ksql.api.client.ClientOptions
import io.confluent.ksql.api.client.*
fun main()
{
val KSQLDB_SERVER_HOST = "localhost"
val KSQLDB_SERVER_HOST_PORT = 8089
val clientOptions = ClientOptions.create()
.setHost(KSQLDB_SERVER_HOST)
.setPort(KSQLDB_SERVER_HOST_PORT)
val client: Client = io.confluent.ksql.api.client.Client.create(clientOptions)
val topics = client.listTopics() //not available in 6.0.0
}
Edit:
Based on @Hellmar Becker's post I would like to use the standalone (community) version not the commercial Confluent Platform version. It looks like that the CP version uses an older API version anyway.
I found an example how to do this with pom.xml on Github developer guide, but I would like to use a build.gradle file
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…