Skip to content

Commit da2da48

Browse files
authored
Merge pull request #66 from SolaceDev/upgrade/kafka-3.x
3.0.0 Release
2 parents 482b471 + ca29115 commit da2da48

19 files changed

+89
-68
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ jobs:
4242
restore-keys: |
4343
${{ runner.os }}-gradle-build-test-
4444
45-
- name: Setup JDK 8
45+
- name: Setup JDK 11
4646
uses: actions/setup-java@v2
4747
with:
4848
distribution: zulu
49-
java-version: 8
49+
java-version: 11
5050

5151
- name: Validate Gradle wrapper
5252
uses: gradle/wrapper-validation-action@v1
5353

5454
- name: Install Test Support
5555
working-directory: solace-integration-test-support
56-
run: ./mvnw clean install -DskipTests
56+
run: ./mvnw clean install -DskipTests -Dchangelist=
5757

5858
- name: Build and test with Gradle
5959
run: ./gradlew clean test integrationTest jacocoFullReport --info

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
# Initializes the CodeQL tools for scanning.
6060
- name: Initialize CodeQL
61-
uses: github/codeql-action/init@v1
61+
uses: github/codeql-action/init@v2
6262
with:
6363
languages: java
6464
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -72,7 +72,7 @@ jobs:
7272
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
7373
# If this step fails, then you should remove it and run the build manually (see below)
7474
- name: Autobuild
75-
uses: github/codeql-action/autobuild@v1
75+
uses: github/codeql-action/autobuild@v2
7676

7777
# ℹ️ Command-line programs to run using the OS shell.
7878
# 📚 https://git.io/JvXDl
@@ -86,7 +86,7 @@ jobs:
8686
# make release
8787

8888
- name: Perform CodeQL Analysis
89-
uses: github/codeql-action/analyze@v1
89+
uses: github/codeql-action/analyze@v2
9090

9191
- name: Cleanup Gradle Cache
9292
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.

.github/workflows/pmd-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
restore-keys: |
3838
${{ runner.os }}-gradle-pmd-
3939
40-
- name: Setup JDK 8
40+
- name: Setup JDK 11
4141
uses: actions/setup-java@v2
4242
with:
4343
distribution: zulu
44-
java-version: 8
44+
java-version: 11
4545

4646
- name: Validate Gradle wrapper
4747
uses: gradle/wrapper-validation-action@v1

.github/workflows/spotbugs-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
restore-keys: |
3838
${{ runner.os }}-gradle-spotbugs-
3939
40-
- name: Setup JDK 8
40+
- name: Setup JDK 11
4141
uses: actions/setup-java@v2
4242
with:
4343
distribution: zulu
44-
java-version: 8
44+
java-version: 11
4545

4646
- name: Validate Gradle wrapper
4747
uses: gradle/wrapper-validation-action@v1

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Refer to the in-line documentation of the [sample PubSub+ Kafka Source Connector
129129

130130
### Deployment
131131

132-
The PubSub+ Source Connector deployment has been tested on Apache Kafka 2.4 and Confluent Kafka 5.4 platforms. The Kafka software is typically placed under the root directory: `/opt/<provider>/<kafka or confluent-version>`.
132+
The PubSub+ Source Connector deployment has been tested on Apache Kafka 3.5 and Confluent Kafka 7.4 platforms. The Kafka software is typically placed under the root directory: `/opt/<provider>/<kafka or confluent-version>`.
133133

134134
Kafka distributions may be available as install bundles, Docker images, Kubernetes deployments, etc. They all support Kafka Connect which includes the scripts, tools and sample properties for Kafka connectors.
135135

@@ -156,7 +156,7 @@ In this case the IP address is one of the nodes running the distributed mode wor
156156
{
157157
"class": "com.solace.connector.kafka.connect.source.SolaceSourceConnector",
158158
"type": "source",
159-
"version": "2.1.0"
159+
"version": "3.0.0"
160160
},
161161
```
162162

@@ -317,7 +317,7 @@ Kerberos has some very specific requirements to operate correctly. Some addition
317317

318318
### Build the Project
319319

320-
JDK 8 or higher is required for this project.
320+
JDK 11 or higher is required for this project.
321321

322322
1. First, clone this GitHub repo:
323323
```shell
@@ -328,7 +328,7 @@ JDK 8 or higher is required for this project.
328328
```shell
329329
git submodule update --init --recursive
330330
cd solace-integration-test-support
331-
./mvnw clean install -DskipTests
331+
./mvnw clean install -DskipTests -Dchangelist=
332332
cd ..
333333
```
334334
3. Then run the build script:
@@ -358,13 +358,13 @@ To get started, import the following dependency into your project:
358358
<dependency>
359359
<groupId>com.solace.connector.kafka.connect</groupId>
360360
<artifactId>pubsubplus-connector-kafka-source</artifactId>
361-
<version>2.1.0</version>
361+
<version>3.0.0</version>
362362
</dependency>
363363
```
364364

365365
**Gradle**
366366
```groovy
367-
compile "com.solace.connector.kafka.connect:pubsubplus-connector-kafka-source:2.1.0"
367+
compile "com.solace.connector.kafka.connect:pubsubplus-connector-kafka-source:3.0.0"
368368
```
369369

370370
Now you can implement your custom `SolMessageProcessorIF`.

build.gradle

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ plugins {
1414
}
1515

1616
ext {
17-
kafkaVersion = '2.8.1'
18-
solaceJavaAPIVersion = '10.15.0'
17+
kafkaVersion = '3.5.1'
18+
solaceJavaAPIVersion = '10.21.0'
1919
isSnapshot = project.version.endsWith('-SNAPSHOT')
2020
}
2121

@@ -44,7 +44,7 @@ dependencies {
4444
integrationTestImplementation 'org.testcontainers:junit-jupiter:1.16.0'
4545
integrationTestImplementation 'org.testcontainers:kafka:1.16.0'
4646
integrationTestImplementation 'org.testcontainers:toxiproxy:1.16.0'
47-
integrationTestImplementation 'com.solace.test.integration:pubsubplus-junit-jupiter:0.7.1'
47+
integrationTestImplementation 'com.solace.test.integration:pubsubplus-junit-jupiter:1.1.0'
4848
integrationTestImplementation 'org.slf4j:slf4j-api:1.7.32'
4949
integrationTestImplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0'
5050
integrationTestImplementation 'org.apache.commons:commons-configuration2:2.6'
@@ -60,6 +60,7 @@ dependencies {
6060
testImplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0'
6161
implementation "org.apache.kafka:connect-api:$kafkaVersion"
6262
implementation "com.solacesystems:sol-jcsmp:$solaceJavaAPIVersion"
63+
implementation "org.slf4j:slf4j-api:1.7.36"
6364
}
6465

6566
pmd {
@@ -198,6 +199,18 @@ task('generateJava', type: Copy) {
198199

199200
project.compileJava {
200201
dependsOn generateJava
202+
sourceCompatibility '11'
203+
targetCompatibility '11'
204+
}
205+
206+
project.compileTestJava {
207+
sourceCompatibility '11'
208+
targetCompatibility '11'
209+
}
210+
211+
project.compileIntegrationTestJava {
212+
sourceCompatibility '11'
213+
targetCompatibility '11'
201214
}
202215

203216
java {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=com.solace.connector.kafka.connect
2-
version=2.3.0
2+
version=3.0.0

src/integrationTest/java/com/solace/connector/kafka/connect/source/it/SolaceConnectorDeployment.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ public SolaceConnectorDeployment(KafkaConnection kafkaConnection, String kafkaTo
4747

4848
public void waitForConnectorRestIFUp() {
4949
Request request = new Request.Builder().url(kafkaConnection.getConnectUrl() + "/connector-plugins").build();
50-
Response response = null;
51-
do {
52-
try {
53-
Thread.sleep(1000L);
54-
response = client.newCall(request).execute();
55-
} catch (IOException | InterruptedException e) {
56-
// Continue looping
57-
}
58-
} while (response == null || !response.isSuccessful());
50+
assertTimeoutPreemptively(Duration.ofMinutes(15), () -> {
51+
Response response = null;
52+
do {
53+
try {
54+
Thread.sleep(1000L);
55+
response = client.newCall(request).execute();
56+
} catch (IOException | InterruptedException e) {
57+
logger.error("Failed to get connector-plugins", e);
58+
}
59+
} while (response == null || !response.isSuccessful());
60+
});
5961
}
6062

6163
void startConnector(Properties props) {

src/integrationTest/java/com/solace/connector/kafka/connect/source/it/SolaceSourceTaskIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import com.solace.connector.kafka.connect.source.SolMessageProcessorIF;
44
import com.solace.connector.kafka.connect.source.SolaceSourceConstants;
55
import com.solace.connector.kafka.connect.source.SolaceSourceTask;
6-
import com.solace.connector.kafka.connect.source.it.util.extensions.NetworkPubSubPlusExtension;
76
import com.solace.connector.kafka.connect.source.msgprocessors.SolSampleSimpleMessageProcessor;
87
import com.solace.test.integration.junit.jupiter.extension.ExecutorServiceExtension;
98
import com.solace.test.integration.junit.jupiter.extension.ExecutorServiceExtension.ExecSvc;
109
import com.solace.test.integration.junit.jupiter.extension.LogCaptorExtension;
1110
import com.solace.test.integration.junit.jupiter.extension.LogCaptorExtension.LogCaptor;
11+
import com.solace.test.integration.junit.jupiter.extension.PubSubPlusExtension;
1212
import com.solace.test.integration.semp.v2.SempV2Api;
1313
import com.solacesystems.jcsmp.BytesXMLMessage;
1414
import com.solacesystems.jcsmp.JCSMPErrorResponseException;
@@ -52,7 +52,7 @@
5252

5353
@ExtendWith(ExecutorServiceExtension.class)
5454
@ExtendWith(LogCaptorExtension.class)
55-
@ExtendWith(NetworkPubSubPlusExtension.class)
55+
@ExtendWith(PubSubPlusExtension.class)
5656
public class SolaceSourceTaskIT {
5757
private SolaceSourceTask solaceSourceTask;
5858
private Map<String, String> connectorProperties;

0 commit comments

Comments
 (0)