[ 
https://issues.apache.org/jira/browse/QPID-3785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Ross closed QPID-3785.
-----------------------------

    
> Broker name parametrization
> ---------------------------
>
>                 Key: QPID-3785
>                 URL: https://issues.apache.org/jira/browse/QPID-3785
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, Qpid Managment Framework
>            Reporter: Sebastiano Merlino
>            Assignee: Ted Ross
>              Labels: patch
>         Attachments: diff.patch
>
>
> In order to allow management tools (e.g. cumin, sesame) to properly work in a 
> multibroker environment without overlapping data between different brokers, 
> it would be useful to set the broker name through the use of a parameter. For 
> example, sesame generate the data identifier starting from the broker name.
> In actual implementation the broker name is always settled to "amqp-broker". 
> I have applied this patch to the code:
> {code} 
> Index: Broker.cpp
> ===================================================================
> --- Broker.cpp        (revisione 1235214)
> +++ Broker.cpp        (copia locale)
> @@ -101,6 +101,7 @@
>  
>  Broker::Options::Options(const std::string& name) :
>      qpid::Options(name),
> +     brokerName("amqp-broker"),
>      noDataDir(0),
>      port(DEFAULT_PORT),
>      workerThreads(5),
> @@ -135,6 +136,7 @@
>      dataDir += DEFAULT_DATA_DIR_NAME;
>  
>      addOptions()
> +             ("broker-name", optValue(brokerName, "STR"), "Broker name on 
> the network")
>          ("data-dir", optValue(dataDir,"DIR"), "Directory to contain 
> persistent data generated by the broker")
>          ("no-data-dir", optValue(noDataDir), "Don't use a data directory.  
> No persistent configuration will be loaded or stored")
>          ("port,p", optValue(port,"PORT"), "Tells the broker to listen on 
> PORT")
> @@ -209,7 +211,7 @@
>          System* system = new System (dataDir.isEnabled() ? dataDir.getPath() 
> : string(), this);
>          systemObject = System::shared_ptr(system);
>  
> -        mgmtObject = new _qmf::Broker(managementAgent.get(), this, system, 
> "amqp-broker");
> +        mgmtObject = new _qmf::Broker(managementAgent.get(), this, system, 
> conf.brokerName);
>          
> mgmtObject->set_systemRef(system->GetManagementObject()->getObjectId());
>          mgmtObject->set_port(conf.port);
>          mgmtObject->set_workerThreads(conf.workerThreads);
> Index: Broker.h
> ===================================================================
> --- Broker.h  (revisione 1235214)
> +++ Broker.h  (copia locale)
> @@ -96,6 +96,7 @@
>  
>          QPID_BROKER_EXTERN Options(const std::string& name="Broker Options");
>  
> +             std::string brokerName;
>          bool noDataDir;
>          std::string dataDir;
>          uint16_t port;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to