Technical Specification
Overview
This technical specification page will detail three areas of work to complete the Status Update change:
- The new classes required
- The additions to existing classes
- The deletions from existing classes
New classes
The new classes required draws on the design work already completed. The abstraction layer will be the new code created as part of this work. This can be split in to Interfaces and Classes.
Interface list
These interfaces form the abstraction layer.
Interface |
Description |
---|---|
LogActor |
Actor that is requesting the log to be performed. |
MessageStatusLogger |
Entity that wishes to provide log statements. |
MessageStatusLoggerFactory |
Factory to generate MSLoggers. |
RootMessageStatusLogger |
Root logger that performs logging. |
RawMessageLogger |
Wrapper for object that actually performs the logging. |
Class List
Implementation of the Actors
Class |
Description |
---|---|
ConnectionActor |
Responsible for providing data about the Connection when logging. |
ManagementConnectionActor |
Responsible for providing data about the Management Connection when logging. |
Implementation of the Loggers
Class |
Description |
---|---|
ConnectionMessageStatusLogger |
Logger responsible for the Connection format. |
ChannelMessageStatusLogger |
Logger responsible for the Channel format. |
QueueMessageStatusLogger |
Logger responsible for the Queue format. |
ExchangeMessageStatusLogger |
Logger responsible for the Exchange format. |
BindingMessageStatusLogger |
Logger responsible for the Binding format. |
SubscriptionMessageStatusLogger |
Logger responsible for the subscription format. |
MessageStoreMessageStatusLogger |
Logger responsible for the MessageStore format. |
RootMessageStatusLoggerImpl |
Base logger that performs the final message formatting before logging. |
MessageStatusLoggerFactoryImpl |
Factory to create the above Loggers. |
Logging
Class |
Description |
---|---|
Log4jRawMessageLogger |
Wrapper to use log4j as the output mechanism. |
TestRawMessageLogger |
Wrapper that provides an inspectable log for testing. |
Log Messages
Class |
Description |
---|---|
BrokerLogMessages |
A static class that contains accessors to the various parametrised log messages. |
Additions to existing classes
The following classes will have logging added to provide the required log messages specified in the Functional Specification.
Main
BRK-1001 : Startup : Version: <Version> Build: <Build> BRK-1004 : Ready BRK-1007 : Using logging configuration : <path>
ApplicationRegistry
BRK-1002 : Starting : Listening on <Transport> port <Port> BRK-1003 : Shuting down : <Transport> port <Port> BRK-1005 : Stopped
ConfigurationFileApplicationRegistry
BRK-1006 : Using configuration : <path>
JMXManagedObjectRegistry
MNG-1001 : Startup MNG-1002 : Starting : <service> : Listening on port <Port> MNG-1003 : Shuting down : <service> : port <Port> MNG-1004 : Ready MNG-1005 : Stopped MNG-1006 : Using SSL Keystore : <path>
VirtualHost
VHT-1001 : Created : <name> VHT-1002 : Closed
DerbyMessageStore/MemoryMessageStore
MST-1001 : Created : <name> MST-1003 : Closed
DerbyMessageStore
MST-1002 : Store location : <path> MST-1004 : Recovery Start [: <queue.name>] MST-1005 : Recovered <count> messages for queue <queue.name> MST-1006 : Recovery Complete [: <queue.name>]
AMQMinaProtocolSession
CON-1001 : Open : Client ID <id> : Protocol Version : <version> CON-1002 : Close
AMQChannel
CHN-1001 : Create : Prefetch <count> CHN-1002 : Flow <value> CHN-1003 : Close
QueueRegistry
QUE-1001 : Create : [AutoDelete] [Durable|Transient] [Priority:<levels>] Owner:<name> QUE-1002 : Deleted
AbstractExchange
EXH-1001 : Create : [Durable] Type:<value> Name:<value> EXH-1002 : Deleted
ExchangeBindings
BND-1001 : Create [: Arguments : <key=value>] BND-1002 : Deleted
SubscriptionImpl
SUB-1001 : Create : [Durable] [Arguments : <key=value>] SUB-1002 : Close
Deletions from existing classes
The following log statements should be removed from the broker packages as they are being replaced with a new message.
SimpleAMQQueue
_logger.info("Auto-deleteing queue:" + this);
JMXManagedObjectRegistry
log.info("Initialising managed object registry using platform MBean server"); _log.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath()); _startupLog.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath());
DerbyMessageStore
_logger.info("Configuring Derby message store for virtual host " + virtualHost.getName()); _logger.info("Recovering persistent state..."); _logger.info("Persistent state recovered successfully"); _logger.info("Recovering durable exchange " + exchange.getName() + " of type " + exchange.getType() + "..."); _logger.info("Restoring binding: (Exchange: " + exchange.getName() + ", Queue: " + queueName _logger.info("Recovered message counts: " + queueRecoveries); _logger.debug("public void createQueue(AMQQueue queue = " + queue + "): called"); _logger.debug("public void removeQueue(AMQShortString name = " + name + "): called"); _logger.debug("On recovery, delivering " + message.getMessageId() + " to " + queue.getName());
MemoryMessageStore
_log.info("Using capacity " + DEFAULT_HASHTABLE_CAPACITY + " for hash tables"); _log.info("Using capacity " + hashtableCapacity + " for hash tables");
VirtualHost
_logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + this); _logger.debug("Loading configuration for virtualhost: " + config.getName());
AMQMinaProtocolSession.java:
_logger.info("Channel[" + channelId + "] awaiting closure - processing close-ok"); _logger.info("Closing channel due to: " + e.getMessage()); _logger.info("Closing connection due to: " + e.getMessage()); _logger.info("Closing connection due to: " + e.getMessage()); _logger.debug("REALLY Closing protocol session:" + _minaProtocolSession);
AMQPFastProtocolHandler
_logger.info("Protocol session created for:" + protocolSession.getRemoteAddress()); _logger.info("Session opened for:" + protocolSession.getRemoteAddress()); _logger.info("Protocol Session closed for:" + protocolSession.getRemoteAddress()); _logger.debug("AMQPFastProtocolHandler created");
SubscriptionImpl
_logger.info("Closing subscription (" + debugIdentity() + "):" + this);
QueueUnbindHandler
_log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey);
ConnectionCloseMethodHandler
_logger.info("ConnectionClose received with reply code/reply text " + body.getReplyText() + " for " + session);
QueueBindHandler
_log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey);
QueueDeclareHandler
_logger.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getName() + ")"); _logger.info("Queue " + queueName + " declared successfully");
Main
_brokerLogger.info("Starting Qpid Broker " + QpidProperties.getReleaseVersion() _brokerLogger.info("Qpid.AMQP listening on non-SSL address " + bindAddress); _brokerLogger.info("Qpid.AMQP listening on SSL port " + config.getSSLPort()); _brokerLogger.info("Qpid Broker Ready :" + QpidProperties.getReleaseVersion()
Configuration
_devlog.info("Configuring logger using configuration file " + logConfigFile.getAbsolutePath()); _devlog.info("log file " + logConfigFile.getAbsolutePath() + " will be checked for changes every _devlog.debug("Using configuration file " + _configFile.getAbsolutePath()); ex.getMessage());
ChannelFlowHandler.java:
_logger.debug("Channel.Flow for channel " + channelId + ", active=" + body.getActive());
BasicConsumeMethodHandler
_logger.debug("BasicConsume: from '" + body.getQueue() + _logger.debug("No queue for '" + body.getQueue() + "'"); _logger.debug("Closing connection due to invalid selector");
HeadersExchange
_logger.debug("Exchange " + getName() + ": Unbinding " + queue.getName()); _logger.debug("Exchange " + getName() + ": routing message with headers " + headers);