New design for the Java Broker configurationPage added by Alex RudyyCurrent situationCurrently the broker is configured via a config.xml. This file is read on startup and the system responds by creating objects that form the Broker. The current system has a number of shortcomings:
Brief Overview of Broker ArchitectureThe Broker currently consists of a tree of ConfiguredObjects, each representing a functional-area of the Broker that the user may wish to manage. The Broker is the top of the tree and has children such as Ports, AuthenticationManagers etc. In addition to children, configured objects also have a series of attributes. For instance, a Port has a portNumber attribute. This tree is created on Broker start-up from Broker configuration. Design ProposalThe main features of the design are as follows:
Key InterfacesBrokerStoreThe BrokerStore allows the caller to construct the Broker as defined by the stored configuration. The caller will receive a tree of configured objects, complete with all attributes and children intact. Internally, the BrokerStore will use a concrete implementation of ConfigurationEntryStore to read a list of ConfigurationEnties from the store (each ConfigurationEntry represents one ConfiguredObject)ยท It then uses a BrokerCreator to turn the list of entries into a tree of ConfiguredObjects. It will also use a ConfigurationChangeMonitor to listen for changes in the tree of ConfiguredObjects and reflect those into the store via the ConfigurationEntryStore interface. ConfigurationEntryStoreThe ConfigurationEntryStore is responsible for reading a list of ConfigurationEntries from the store, and saving any changes. BrokerCreatorThe BrokerCreator constructs the tree of the ConfiguredObjects representing the Broker from the list of ConfigurationEntries. ConfigurationChangeMonitorHas three responsibilities:
The ConfigurationChangeMonitor will avoid listening for events of children of VirtualHosts, nor will it register itself with children beneath the virtualhosts within the tree. UMLThe following UML diagrams document the design. Class DiagramUnable to render embedded object: File (store-classes.png) not found. Sequence Diagram - Broker StartupSequence diagram depicting Broker start-up, loading of configuration, the forming of the ConfiguredObject tree The DefaultBrokerCreator implementation scans the list of ConfigurationEnties. When it encounters the entry representing the Broker, it creates the Broker ConfiguredObject using a factory and 'seeds' a list of factories that will be used to create the Broker's children when these are encountered in the entry list. These factories delegate to the #createChild method of the Broker object itself. As it encounters non-Broker entries, it looks for the factory that was created earlier and fires it, thus creating the child at the right point in the tree. Also if the child itself has children, corresponding factories are added to the list for use when those entries are encountered. Depending on the order of the ConfigurationEnties, it may be necessary to loop more than once. Unable to render embedded object: File (broker-startup.png) not found. Sequence Diagram - Adding a new child from the management interfaceSequence diagram depicting the adding of the new child from the management interface. This shows how the new child is persisted into the store, and how the ConfigurationChangeMonitor registers itself with the new child. Unable to render embedded object: File (add-child.png) not found. Sequence Diagram - Changing of attributes from management interfacesUnable to render embedded object: File (change-attribute.png) not found. Json configuration store and Json configuration format.On first stages (until ConfiguredObject relationships are introduced) the ConfiguredObject will be stored in the stores using ConfigurationEntry representation. Thus all attributes including references to the other ConfiguredObjects (which are not children) will be stored in the attributes and children will stored as hierarchy. For example, the Port will be stored in JSON format as follows
{
id: "c7038ed9-9ba9-4db1-bc56-ab6c3ab27273",
type: "Port",
attributes: {
port: 5671,
transport: "SSL",
bindingAddress: "0.0.0.0",
protocols: [ "AMQP1-0", ... ],
socketReceiveBuffer: 262144, // optional
socketSendBuffer: 262144, // optional
defaultSupportedProtocolReply: "AMQP0-9" // optional,
tcpNoDelay: true, // optional
frameSize: 65536, // optional
trustStore: "c7038ed9-9ba9-4db1-bc56-ab6c3ab27279",
keyStore: "c7038ed9-9ba9-4db1-bc56-ab6c3ab27278",
clientCertificateAuthType: "NEED" //NEED|WANT|NONE,
}
}
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Qpid > New design for the Java Broker configur... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
- [CONF] Apache Qpid > New design for the Java Broker con... confluence
