diff --git a/distribution/zip/jballerina-tools/LICENSE b/distribution/zip/jballerina-tools/LICENSE index c45eb3dec304..17df447fb889 100644 --- a/distribution/zip/jballerina-tools/LICENSE +++ b/distribution/zip/jballerina-tools/LICENSE @@ -165,7 +165,7 @@ netty-common-4.1.39.Final.jar ballerina-formatter-1.1.0.jar jar apache2 quartz-jobs-2.3.0.jar jar apache2 ballerina-kafka-1.1.0.jar jar apache2 -kafka_2.13-2.8.2.jar jar apache2 +kafka_2.11-2.0.1.jar jar apache2 broker-coordination-0.970.0.jar bundle apache2 org.wso2.carbon.messaging-2.3.7.jar bundle apache2 bir.jar jar apache2 diff --git a/distribution/zip/jballerina/LICENSE b/distribution/zip/jballerina/LICENSE index 90ed2e4446ba..c3c39e5094e9 100644 --- a/distribution/zip/jballerina/LICENSE +++ b/distribution/zip/jballerina/LICENSE @@ -165,7 +165,7 @@ netty-common-4.1.39.Final.jar ballerina-formatter-1.1.0.jar jar apache2 quartz-jobs-2.3.0.jar jar apache2 ballerina-kafka-1.1.0.jar jar apache2 -kafka_2.13-2.8.2.jar jar apache2 +kafka_2.11-2.0.1.jar jar apache2 broker-coordination-0.970.0.jar bundle apache2 org.wso2.carbon.messaging-2.3.7.jar bundle apache2 bir.jar jar apache2 diff --git a/gradle.properties b/gradle.properties index 6c38857f3771..f9fd87e1a4ba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ org.gradle.caching=true org.gradle.parallel=true org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.workers.max=3 -version=1.2.46-SNAPSHOT +version=1.2.45 group=org.ballerinalang bootstrappedOn=1.1.0-alpha diff --git a/gradle/javaLibsProject.gradle b/gradle/javaLibsProject.gradle index 97eaaf23caae..b9281a166b40 100644 --- a/gradle/javaLibsProject.gradle +++ b/gradle/javaLibsProject.gradle @@ -44,8 +44,8 @@ dependencies { dist 'org.bouncycastle:bcpkix-jdk15on:1.61' dist 'info.picocli:picocli:4.0.1' - dist 'org.apache.kafka:kafka-clients:2.8.2' - dist 'org.apache.kafka:kafka_2.13:2.8.2' + dist 'org.apache.kafka:kafka-clients:2.3.1' + dist 'org.apache.kafka:kafka_2.11:2.3.1' dist 'io.ballerina.messaging:broker-auth:0.970.0' dist 'io.ballerina.messaging:broker-common:0.970.0' dist 'io.ballerina.messaging:broker-coordination:0.970.0' diff --git a/gradle/javaProject.gradle b/gradle/javaProject.gradle index 3e2b671c14bd..c999eac5b5b8 100644 --- a/gradle/javaProject.gradle +++ b/gradle/javaProject.gradle @@ -59,8 +59,8 @@ dependencies { implementation 'org.apache.commons:commons-text:1.10.0' implementation 'org.apache.directory.server:apacheds-all:2.0.0-M24' implementation 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1' - implementation 'org.apache.kafka:kafka-clients:2.8.2' - implementation 'org.apache.kafka:kafka_2.13:2.8.2' + implementation 'org.apache.kafka:kafka-clients:2.3.1' + implementation 'org.apache.kafka:kafka_2.11:2.3.1' implementation 'org.apache.avro:avro:1.9.2' implementation 'org.apache.james:apache-mime4j-core:0.8.9' implementation 'org.apache.mina:mina-core:2.0.16' diff --git a/misc/testerina/modules/testerina-core/src/main/ballerina/Ballerina.toml b/misc/testerina/modules/testerina-core/src/main/ballerina/Ballerina.toml index 6e122b6e2bc2..567dbb9d85ce 100644 --- a/misc/testerina/modules/testerina-core/src/main/ballerina/Ballerina.toml +++ b/misc/testerina/modules/testerina-core/src/main/ballerina/Ballerina.toml @@ -8,5 +8,5 @@ target = "java8" [[platform.libraries]] artifactId = "mock" version = "0.0.0" - path = "./lib/testerina-core-1.2.45.jar" + path = "./lib/testerina-core-1.2.44.jar" groupId = "ballerina" diff --git a/stdlib/messaging/kafka/build.gradle b/stdlib/messaging/kafka/build.gradle index bc679a0d31ac..968b4433e178 100644 --- a/stdlib/messaging/kafka/build.gradle +++ b/stdlib/messaging/kafka/build.gradle @@ -37,7 +37,7 @@ dependencies { implementation project(':ballerina-time') implementation project(':ballerina-lang:internal') implementation 'org.apache.kafka:kafka-clients' - implementation 'org.apache.kafka:kafka_2.13' + implementation 'org.apache.kafka:kafka_2.11' implementation 'org.apache.avro:avro' baloImplementation project(path: ':ballerina-filepath', configuration: 'baloImplementation') diff --git a/stdlib/messaging/kafka/src/main/ballerina/Ballerina.toml b/stdlib/messaging/kafka/src/main/ballerina/Ballerina.toml index a0a93e253866..16f6840b5f7e 100644 --- a/stdlib/messaging/kafka/src/main/ballerina/Ballerina.toml +++ b/stdlib/messaging/kafka/src/main/ballerina/Ballerina.toml @@ -14,14 +14,14 @@ target = "java8" [[platform.libraries]] artifactId = "kafka-clients" - version = "2.8.2" - path = "./lib/kafka-clients-2.8.2.jar" + version = "2.3.1" + path = "./lib/kafka-clients-2.3.1.jar" groupId = "org.apache.kafka" modules = ["kafka"] [[platform.libraries]] - artifactId = "kafka_2.13" - version = "2.8.2" - path = "./lib/kafka_2.13-2.8.2.jar" + artifactId = "kafka_2.11" + version = "2.3.1" + path = "./lib/kafka_2.11-2.3.1.jar" groupId = "org.apache.kafka" modules = ["kafka"] diff --git a/stdlib/messaging/kafka/src/test/java/org/ballerinalang/messaging/kafka/utils/KafkaLocal.java b/stdlib/messaging/kafka/src/test/java/org/ballerinalang/messaging/kafka/utils/KafkaLocal.java index cc7e66ce3302..5f64742f9732 100644 --- a/stdlib/messaging/kafka/src/test/java/org/ballerinalang/messaging/kafka/utils/KafkaLocal.java +++ b/stdlib/messaging/kafka/src/test/java/org/ballerinalang/messaging/kafka/utils/KafkaLocal.java @@ -18,10 +18,14 @@ package org.ballerinalang.messaging.kafka.utils; +import kafka.metrics.KafkaMetricsReporter; +import kafka.metrics.KafkaMetricsReporter$; import kafka.server.KafkaConfig; import kafka.server.KafkaServer; +import kafka.utils.VerifiableProperties; import org.apache.kafka.common.utils.Time; import scala.Option; +import scala.collection.Seq; import java.util.Properties; @@ -30,11 +34,13 @@ */ public class KafkaLocal { private static final String prefix = "kafka-thread"; - private final KafkaServer kafkaServer; + private KafkaServer kafkaServer; + private Seq reporters; public KafkaLocal(Properties properties) { KafkaConfig kafkaConfig = KafkaConfig.fromProps(properties); - this.kafkaServer = new KafkaServer(kafkaConfig, Time.SYSTEM, Option.apply(prefix), false); + reporters = KafkaMetricsReporter$.MODULE$.startReporters(new VerifiableProperties(properties)); + this.kafkaServer = new KafkaServer(kafkaConfig, Time.SYSTEM, Option.apply(prefix), reporters); } public void start() { diff --git a/tests/jballerina-integration-test/build.gradle b/tests/jballerina-integration-test/build.gradle index 2c5239db9325..dec306fbdfde 100644 --- a/tests/jballerina-integration-test/build.gradle +++ b/tests/jballerina-integration-test/build.gradle @@ -86,7 +86,7 @@ dependencies { implementation project(':observability-test-utils') implementation project(path: ':ballerina-test-utils', configuration: 'shadow') implementation 'org.apache.kafka:kafka-clients' - implementation 'org.apache.kafka:kafka_2.13' + implementation 'org.apache.kafka:kafka_2.11' implementation 'io.netty:netty-tcnative-classes' implementation 'io.netty:netty-tcnative-boringssl-static' implementation 'io.netty:netty-tcnative-boringssl-static::windows-x86_64'