Skip to content

Commit

Permalink
Update Pulsar 3.0.0 (spring-projects#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc authored May 10, 2023
1 parent e696220 commit 9f2b284
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
4 changes: 2 additions & 2 deletions spring-pulsar-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ ext {
googleJsr305Version = '3.0.2'
protobufJavaVersion = '3.21.5'
testcontainersVersion = '1.17.6'
pulsarVersion = '2.11.0'
pulsarVersion = '3.0.0'
pulsarClientReactiveVersion = '0.3.0'
springBootVersion = '3.0.5'
springPulsarStarterVersion = '0.2.1-SNAPSHOT'
springPulsarBinderVersion = '0.2.0'
springPulsarBinderVersion = '0.2.1-SNAPSHOT'
springCloudStreamVersion = '4.0.1'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
:spring-cloud-stream-docs: https://docs.spring.io/spring-cloud-stream/docs/{spring-cloud-stream-version}/reference/html/
:spring-cloud-function: https://spring.io/projects/spring-cloud-function

:apache-pulsar-docs: https://pulsar.apache.org/docs/2.11.x
:apache-pulsar-docs: https://pulsar.apache.org/docs/3.0.x
:apache-pulsar-io-docs: {apache-pulsar-docs}/io-connectors
:apache-pulsar-function-docs: {apache-pulsar-docs}/functions-overview
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

mkdir connectors
cd connectors
wget https://archive.apache.org/dist/pulsar/pulsar-2.11.0/connectors/pulsar-io-cassandra-2.11.0.nar
wget https://archive.apache.org/dist/pulsar/pulsar-2.11.0/connectors/pulsar-io-rabbitmq-2.11.0.nar
wget https://archive.apache.org/dist/pulsar/pulsar-3.0.0/connectors/pulsar-io-cassandra-3.0.0.nar
wget https://archive.apache.org/dist/pulsar/pulsar-3.0.0/connectors/pulsar-io-rabbitmq-3.0.0.nar
cd ..
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ repositories {
}

dependencies {
implementation 'org.apache.pulsar:pulsar-client-all:2.11.0'
implementation 'org.apache.pulsar:pulsar-functions-api:2.11.0'
implementation 'org.apache.pulsar:pulsar-client-all:3.0.0'
implementation 'org.apache.pulsar:pulsar-functions-api:3.0.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package org.springframework.pulsar.test.support;

import java.util.Locale;

import org.junit.jupiter.api.BeforeAll;
import org.testcontainers.containers.PulsarContainer;
import org.testcontainers.junit.jupiter.Testcontainers;
Expand All @@ -43,25 +41,11 @@ static String getPulsarBrokerUrl() {
}

static DockerImageName getPulsarImage() {
return isRunningOnMacM1() ? getMacM1PulsarImage() : getStandardPulsarImage();
return DockerImageName.parse("apachepulsar/pulsar:3.0.0");
}

static String getHttpServiceUrl() {
return PULSAR_CONTAINER.getHttpServiceUrl();
}

private static boolean isRunningOnMacM1() {
String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
String osArchitecture = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH);
return osName.contains("mac") && osArchitecture.equals("aarch64");
}

private static DockerImageName getStandardPulsarImage() {
return DockerImageName.parse("apachepulsar/pulsar:2.11.0");
}

private static DockerImageName getMacM1PulsarImage() {
return DockerImageName.parse("kezhenxu94/pulsar").asCompatibleSubstituteFor("apachepulsar/pulsar");
}

}
2 changes: 1 addition & 1 deletion tools/pulsar/docker/standalone/pulsar-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
docker run -it -p 6650:6650 -p 8080:8080 \
--mount source=pulsardata,target=/pulsar/data \
--mount source=pulsarconf,target=/pulsar/conf \
apachepulsar/pulsar:2.11.0 \
apachepulsar/pulsar:3.0.0 \
bin/pulsar standalone

0 comments on commit 9f2b284

Please sign in to comment.