Commit a1e71715 by Amir Aharon

fix Pulsar Params Builder

parent ad8e30cf
...@@ -6,7 +6,7 @@ docker run -it -p 80:80 -p 8080:8080 -p 6650:6650 apachepulsar/pulsar-standalone ...@@ -6,7 +6,7 @@ docker run -it -p 80:80 -p 8080:8080 -p 6650:6650 apachepulsar/pulsar-standalone
- show tenant - show tenant
curl -s http://localhost:8080/admin/v2/tenants/mcz curl -s http://localhost:8080/admin/v2/tenants/mcz
- show namespaces - show namespaces
curl -s http://localhost:8080/admin/v2/namespaces/mcx/publish curl -s http://localhost:8080/admin/v2/namespaces/mcx/publish
[pulsar-admin] [pulsar-admin]
run "docker exec -it [pulsar-standalone-instance] bash" run "docker exec -it [pulsar-standalone-instance] bash"
......
...@@ -66,7 +66,7 @@ public class PulsarParams { ...@@ -66,7 +66,7 @@ public class PulsarParams {
try { try {
if (adminUrl == null) { if (adminUrl == null) {
String host = serviceUrl.substring(0, serviceUrl.indexOf(':')); String host = serviceUrl.substring(0, serviceUrl.indexOf(':'));
adminUrl = String.format("%s:%u",host, DEFAULT_ADMIN_PORT); adminUrl = String.format("%s:%d",host, DEFAULT_ADMIN_PORT);
} }
if (consumersThreadPoolSize == 0){ if (consumersThreadPoolSize == 0){
consumersThreadPoolSize = Runtime.getRuntime().availableProcessors(); consumersThreadPoolSize = Runtime.getRuntime().availableProcessors();
......
...@@ -103,7 +103,7 @@ public class TestMicroserviceApp { ...@@ -103,7 +103,7 @@ public class TestMicroserviceApp {
.build(); .build();
CommonServices.IService pulsarPubSub = ServiceBuilderFactory.createPubSubServicePulsarBuilder(CommonServices.EnumPubSubServiceMode.E_BOTH) CommonServices.IService pulsarPubSub = ServiceBuilderFactory.createPubSubServicePulsarBuilder(CommonServices.EnumPubSubServiceMode.E_BOTH)
.setServiceUrl("localhost:6650") .setServiceUrl("localhost:6650")
.setAdminUrl("localhost:8080") .setAdminUrl(null)
.setClusters("standalone") .setClusters("standalone")
.build(); .build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment