Skip to content

Commit

Permalink
Merge pull request #41610 from ballerina-platform/revert-41595-releas…
Browse files Browse the repository at this point in the history
…e-1.2.45

Revert "Upgrade kafka/kafka-clients to V2.8.2 "
  • Loading branch information
LakshanWeerasinghe authored Oct 31, 2023
2 parents 085f650 + 758c7e8 commit 07fe345
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion distribution/zip/jballerina-tools/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion distribution/zip/jballerina/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions gradle/javaLibsProject.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions gradle/javaProject.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion stdlib/messaging/kafka/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
10 changes: 5 additions & 5 deletions stdlib/messaging/kafka/src/main/ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -30,11 +34,13 @@
*/
public class KafkaLocal {
private static final String prefix = "kafka-thread";
private final KafkaServer kafkaServer;
private KafkaServer kafkaServer;
private Seq<KafkaMetricsReporter> 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() {
Expand Down
2 changes: 1 addition & 1 deletion tests/jballerina-integration-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 07fe345

Please sign in to comment.