Trace Swiftlet
The Trace Swiftlet is the central trace facility of a SwiftMQ router. It is intended for maintenance. In some cases, it is reasonable for SwiftMQ users to use tracing as well, for example, during the setup of JNDI replication.
The concept is that every SwiftMQ component gets a named space for tracing from the Trace Swiftlet. The space can be enabled or disabled. Enabled, the component traces its information to the space, including the identifier of the component, i.e. the Swiftlet name. Within the Trace Swiftlet's configuration, the distribution of the trace streams takes place. Here, it is possible to specify which streams go to which files or to the console. So, one is able to filter out these things very easily.
Every space can be configured with SQL-Like predicates to filter parts of the streams and put them to specific locations, namely a trace file or the console. With this concept, it is easy to check the activity of a specific queue by defining a SQL-Like predicate for the queue name and a trace file for this queue at the queue space, or to check how many threads are running in which pools by defining a predicate which filters the Swiftlet name sys$threadpool
on space kernel
.
The following trace spaces are preconfigured:
kernel
: Used from Kernel Swiftlets. The identifier is the Swiftlet name, e.g.sys$jms
.protocol
: Used from the AMQP, JMS, MQTT, and Routing Swiftlet. The protocol names areamqp
,smqp
,mqtt
,smqpr
.queue
: Used from the Queue Manager Swiftlet: The identifier is the queue name.swiftlet
: Used from Swiftlets: The identifier is the Swiftlet name, e.g.xt$amqpbridge
.
One can define its own trace spaces and use them from custom Swiftlets.
Configuration
The configuration of the Trace Swiftlet is defined within the element
<swiftlet name="sys$trace" .../>
of the router's configuration file.
Attributes of Element "swiftlet"
Definition
Attribute | Type | Mandatory | Description |
---|---|---|---|
max-file-size | java.lang.Integer | No | Max. Tracefile Size (KB) |
number-old-tracefile-generations | java.lang.Integer | No | Number old Tracefile Generations to keep |
Values
Attribute | Values |
---|---|
max-file-size | Default: 10240 |
number-old-tracefile-generations | Default: 50 |
Element List "spaces", Parent Element: "swiftlet"
Trace Space Definitions. This element list contains zero or more "space" elements with this template definition:
Definition
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | java.lang.String | Yes | Name of this Space |
enabled | java.lang.Boolean | No | Enables/Disables the Space |
Values
Attribute | Values |
---|---|
enabled | Default: false |
Element List "predicates", Parent Element: "space"
Predicate Definitions. This element list contains zero or more "predicate" elements with this template definition:
Definition
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | java.lang.String | Yes | Name of this Predicate |
enabled | java.lang.Boolean | No | Enables/Disables this Predicate |
filename | java.lang.String | Yes | Output Filename |
value | java.lang.String | Yes | SQL-Like Predicate that selects from the Trace Stream |
Values
Attribute | Values |
---|---|
enabled | Default: true |
filename | |
value |