Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ micrometer = "1.16.4"
micrometer-docs-gen = "1.0.4"
micrometer-tracing = "1.6.4"
protobuf = "3.25.9"
pulsar = "4.1.3"
pulsar = "4.2.0"
spring = "7.0.6"
# tests
assertj = "3.27.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ private PulsarContainerWithSsl(boolean pemBasedTls) {
withStartupTimeout(Duration.ofMinutes(3));
withEnv("PF_ENV_DEBUG", "1");

// Advertise on localhost
withEnv("PULSAR_PREFIX_advertisedAddress", "localhost");

// TLS ports
addExposedPorts(BROKER_TLS_PORT, BROKER_HTTP_TLS_PORT);
withEnv("PULSAR_PREFIX_brokerServicePortTls", String.valueOf(BROKER_TLS_PORT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class SamplePulsarApplicationTests {
@SuppressWarnings("unused")
@Container
@ServiceConnection
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage());
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost");

@Nested
class ImperativeAppTests implements SpringBootTestImperativeApp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class DefaultTenantAndNamespaceTests {
@SuppressWarnings("unused")
@Container
@ServiceConnection
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage());
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost");

@Nested
@SpringBootTest(classes = ImperativeAppConfig.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class PulsarFunctionAdministrationIntegrationTests {
private static final String PULSAR_TOPIC = "pft_foo-topic";

private static final PulsarContainer PULSAR_CONTAINER = new PulsarContainer(
PulsarTestContainerSupport.getPulsarImage());
PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost");

private static final RabbitMQContainer RABBITMQ_CONTAINER = new RabbitMQContainer("rabbitmq");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class PulsarTemplateLambdaWarnLoggerTests {
@SuppressWarnings("unused")
@Container
@ServiceConnection
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage());
static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost");

@Nested
@SpringBootTest(classes = TestAppConfig.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
pulsar:
image: 'apachepulsar/pulsar:4.1.3'
image: 'apachepulsar/pulsar:4.2.0'
ports:
- '6650'
- '8080'
command: 'bin/pulsar standalone'
command: 'bin/pulsar standalone --advertised-address localhost '
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
pulsar:
image: 'apachepulsar/pulsar:4.1.3'
image: 'apachepulsar/pulsar:4.2.0'
ports:
- '6650'
- '8080'
command: 'bin/pulsar standalone'
command: 'bin/pulsar standalone --advertised-address localhost '
4 changes: 2 additions & 2 deletions spring-pulsar-sample-apps/sample-pulsar-binder/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
pulsar:
image: 'apachepulsar/pulsar:4.1.3'
image: 'apachepulsar/pulsar:4.2.0'
ports:
- '6650'
- '8080'
command: 'bin/pulsar standalone'
command: 'bin/pulsar standalone --advertised-address localhost '
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: '3.5'

services:
pulsar:
image: kezhenxu94/pulsar:latest
command: bin/pulsar standalone
image: 'apachepulsar/pulsar:4.2.0'
command: 'bin/pulsar standalone --advertised-address localhost '
ports:
- "6650:6650"
- "8080:8080"
Expand Down
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-4.1.3/connectors/pulsar-io-cassandra-4.1.3.nar
wget https://archive.apache.org/dist/pulsar/pulsar-4.1.3/connectors/pulsar-io-rabbitmq-4.1.3.nar
wget https://archive.apache.org/dist/pulsar/pulsar-4.2.0/connectors/pulsar-io-cassandra-4.2.0.nar
wget https://archive.apache.org/dist/pulsar/pulsar-4.2.0/connectors/pulsar-io-rabbitmq-4.2.0.nar
cd ..
4 changes: 2 additions & 2 deletions spring-pulsar-sample-apps/sample-pulsar-reader/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
pulsar:
image: 'apachepulsar/pulsar:4.1.3'
image: 'apachepulsar/pulsar:4.2.0'
ports:
- '6650'
- '8080'
command: 'bin/pulsar standalone'
command: 'bin/pulsar standalone --advertised-address localhost '
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
@Testcontainers(disabledWithoutDocker = true)
public interface PulsarTestContainerSupport {

PulsarContainer PULSAR_CONTAINER = new PulsarContainer(getPulsarImage());
PulsarContainer PULSAR_CONTAINER = new PulsarContainer(getPulsarImage()).withEnv("PULSAR_PREFIX_advertisedAddress",
"localhost");

static DockerImageName getPulsarImage() {
return DockerImageName.parse("apachepulsar/pulsar:4.1.3");
return DockerImageName.parse("apachepulsar/pulsar:4.2.0");
}

@BeforeAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,9 @@ private void checkIfPausedAndHandleAccordingly() {
}

private boolean transactional() {
return this.transactionTemplate != null && this.transactionManager != null;
return this.transactionTemplate != null
&& this.transactionManager != null
&& this.containerProperties.transactions().isEnabled();
}

private void invokeRecordListener(Messages<T> messages, AtomicBoolean inRetryMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
class PulsarTemplateLocalTransactionTests {

private static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost")
.withTransactions();

private PulsarClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
class DefaultPulsarMessageListenerContainerTxnTests {

private static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost")
.withTransactions();

private PulsarClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
public class PulsarTxnTestsBase {

static PulsarContainer PULSAR_CONTAINER = new PulsarContainer(PulsarTestContainerSupport.getPulsarImage())
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost")
.withTransactions();

@BeforeAll
Expand Down
2 changes: 1 addition & 1 deletion tools/pulsar/docker/standalone/pulsar-start-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ docker run -it -p 6650:6650 -p 8080:8080 \
--mount source=pulsardata,target=/pulsar/data \
--mount source=pulsarconf,target=/pulsar/conf \
kezhenxu94/pulsar:latest \
bin/pulsar standalone
bin/pulsar standalone --advertised-address localhost
4 changes: 2 additions & 2 deletions 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:4.1.3 \
bin/pulsar standalone
apachepulsar/pulsar:4.2.0 \
bin/pulsar standalone --advertised-address localhost