How to Configure Operational Status Logging

New in Apache Qpid 0.6 Java Broker is Operational Status Logging. The design overview can be found here which details all the proposed new logging features.

The Status Logging allows for a range of new log statements which provide details about the various state changes that occur within the broker.

Enabling Status Updates

The new status updates are controlled by the following new configuration entry.

<broker>
    ...
    <status-updates>ON</status-updates>
    ...
</broker>

If the 'status-updates' entry is missing then Apache Qpid Java broker will default logging on. The value of 'on' is not case sensitive but any other string will disable updates.

Broker Locale

The addition of the new logging format also provided the opportunity to allow localisation of the log messages. Currently we have only completed the mapping US English, which therefore is the default.

As the broker starts up a number of standard messages are logged. These messages will be logged in the VM's default locale, if a mapping is available. Once the broker configuration file is read then any locale specified in the configuration file will enabled and adjust the future log statements.

<broker>
    ...
    <advanced>
        ...
        <locale>en_US</locale>
    </advanced>
    ...
</broker>

New Log Messages

There are a number of new log messages generated when status logging is enabled they are broken down in to 10 categories. Each of the messages are detailed below in the Message Section.

Log Format

Currently the messages are logged as part of the default log4j configuration. The default broker log4j configuration will produce messages in this format.

2009-08-13 12:40:35,192 INFO [qpid.message] MESSAGE [Broker] BRK-1002 : Starting : Listening on TCP port 5672

The message is composed in the following way:

<date-time> INFO [qpid.message] MESSAGE <Actor> [<subject>] <MessageID> : <Message>

The display of the first three entries '<date-time> INFO [qpid.message]' depend on your particular log4j configuration however you will always get the final message section:

MESSAGE <Actor> [<Subject>] <MessageID> : <Message>
Actor

There are a number of Actors that can perform loggging, each has a different format which gives additional information about the thread that is performing the logging.

Broker

Actor format:

[Broker]

Used:
On broker startup and shutdown messages logged about the state of the broker will use the Broker actor.

Management

Actor format:

[mng:1(169.24.29.116)]

Used:
When an operation is performed via the JMX interfaces the connection Actor will provide details of the connection that performed the action.

Queue

Actor format:

[vh(/test)/qu(example.queue)]

Used:
This is used when the queue is processing the messages on the queue. Currently only SUB-1003 messages will be logged by this actor

Subscription

Actor format:

[sub:6(vh(test)/qu(example.queue))]

Used:
When a subscription is acting on the broker then it will log messages. Currently SUB-1003 suspend and SUB-1002 messages are the only one that this actor will provide

Channel/Connection

Actor format:

[con:1(/127.0.0.1:59556)]
[con:1(guest@/127.0.0.1:59556/test)]
[con:1(guest@/127.0.0.1:59556/test)/ch:1]

Used:
There are a number of formats that this actor will present depending on the information available. On initial connection open only the remote ip is available. After authentication the username and vhost are available.
Most logging will be of the latter type were the channel id is also present.

Subject
Binding

Subject format:

[vh(/test)/ex(direct/<<default>>)/qu(testQueue)/rk(testQueue)]
Channel\Connection

Subject format:

[con:1(/127.0.0.1:59556)]
[con:1(guest@/127.0.0.1:59556/test)]
[con:1(guest@/127.0.0.1:59556/test)/ch:1]
Exchange

Subject format:

[vh(/test)/ex(direct/testName)]
MessageStore

Subject format:

[vh(/localhost)/ms(DerbyMessageStore)]
Queue

Subject format:

[vh(/test)/qu(testQueue)]
Subscription

Subject format:

[sub:0(qu(testQueue))]

Message List

The definitive list of messages is the property file found here. For readability the list as been reproduced here with additional detail about the various parameterised values, shown like this '<value>', and optional values, shown like '[optional]'.

Broker

BRK-1001 : Startup : Version: <Version> Build: <Build>
BRK-1002 : Starting : Listening on <Transport: TCP|TCP/SSL> port <Port>
BRK-1003 : Shuting down : <Transport: TCP|TCP/SSL> port <Port>
BRK-1004 : Ready
BRK-1005 : Stopped
BRK-1006 : Using configuration : <path>
BRK-1007 : Using logging configuration : <path>

JMX Management

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>
MNG-1007 : Open : User <username>
MNG-1008 : Close

VirtualHost

VHT-1001 : Created : <name>
VHT-1002 : Closed

DerbyMessageStore/MemoryMessageStore

MST-1001 : Created : <full classname>
MST-1002 : Store location : <path>
MST-1003 : Closed
MST-1004 : Recovery Start [: <queue.name>]
MST-1005 : Recovered <count> messages for queue <queue.name>
MST-1006 : Recovery Complete [: <queue.name>]

Connections

CON-1001 : Open : Client ID <id> : Protocol Version : <version>
CON-1002 : Close

AMQChannel

CHN-1001 : Create : Prefetch <count>
CHN-1002 : Flow <value: Started|Stopped>
CHN-1003 : Close
CHN-1004 : Prefetch Size (bytes) <bytes> : Count <message count>

Queue

QUE-1001 : Create : [AutoDelete] [Durable|Transient] [Priority:<levels>] Owner:<name>
QUE-1002 : Deleted

Exchange

EXH-1001 : Create : [Durable] Type:<value> Name:<value>
EXH-1002 : Deleted

Bindings

BND-1001 : Create [: Arguments : <key=value>]
BND-1002 : Deleted

Subscription

SUB-1001 : Create[ : Durable][ : Arguments : {0}]
SUB-1002 : Close
SUB-1003 : State : <state: ACTIVE|SUSPENDED>
  • No labels