diff options
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 1c15747c77..7e0bdcbea8 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -136,13 +136,13 @@ struct ClusterPlugin : public Plugin { Options* getOptions() { return &options; } - void initialize(Plugin::Target& target) { + void earlyInitialize(Plugin::Target& target) { if (values.name.empty()) return; // Only if --cluster-name option was specified. Broker* broker = dynamic_cast<Broker*>(&target); if (!broker) return; cluster = new Cluster( values.name, - values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), + values.url.empty() ? Url() : Url(values.url), *broker, values.quorum, values.readMax, values.writeEstimate*1024 @@ -158,7 +158,9 @@ struct ClusterPlugin : public Plugin { } } - void earlyInitialize(Plugin::Target&) {} + void initialize(Plugin::Target& ) { + cluster->initialize(); + } }; static ClusterPlugin instance; // Static initialization. |