Skip to content

Commit

Permalink
setAdvertisedAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi committed Apr 8, 2024
1 parent bc3b3e5 commit 9c1db29
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public PulsarCluster(Path tempDir, Consumer<ServiceConfiguration> configurationC
ServiceConfiguration config = new ServiceConfiguration();
config.setZookeeperServers(bookKeeperCluster.getZooKeeperAddress());
config.setClusterName("localhost");
config.setAdvertisedAddress("localhost");
config.setBrokerShutdownTimeoutMs(0L);
config.setLoadBalancerOverrideBrokerNicSpeedGbps(Optional.of(1.0d));
config.setManagedLedgerDefaultEnsembleSize(1);
config.setManagedLedgerDefaultWriteQuorum(1);
config.setManagedLedgerDefaultAckQuorum(1);
Expand Down Expand Up @@ -77,10 +80,14 @@ public void start() throws Exception {
bookKeeperCluster.startBookie();
service.start();

service.getAdminClient().clusters().createCluster("localhost", ClusterData.builder()
.serviceUrl(getAddress())
.brokerServiceUrl(service.getBrokerServiceUrl())
.build());
service
.getAdminClient()
.clusters()
.createCluster(
"localhost",
ClusterData.builder()
.brokerServiceUrl(service.getBrokerServiceUrl())
.build());
service
.getAdminClient()
.tenants()
Expand Down

0 comments on commit 9c1db29

Please sign in to comment.