The Trace Swiftlet provides a central trace facility for a SwiftMQ router. It is intended for maintenance. In some case it is reasonable for SwiftMQ users to use tracing as well, for example, during the set up 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
tracefile 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
The following trace spaces are preconfigured:
kernel: Used from Kernel Swiftlets. The identifier is the Swiftlet name, e.g.
protocol: Used from the AMQP, JMS, MQTT and Routing Swiftlet. The protocol names are
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.
One can define its own trace spaces and use it from custom Swiftlets.
The configuration of the Trace Swiftlet is defined within the element
<swiftlet name="sys$trace" .../>
of the router's configuration file. One can use the SwiftMQ Exlorer or CLI for configuration as well. They both save into that file.
Attributes of Element "swiftlet"
|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|
Element List "spaces", Parent Element: "swiftlet"
Trace Space Definitions. This element list contains zero or more "space" elements with this template definition:
|name||java.lang.String||Yes||Name of this Space|
|enabled||java.lang.Boolean||No||Enables/Disables the Space|
Element List "predicates", Parent Element: "space"
Predicate Definitions. This element list contains zero or more "predicate" elements with this template definition:
|name||java.lang.String||Yes||Name of this Predicate|
|enabled||java.lang.Boolean||No||Enables/Disables this Predicate|
|value||java.lang.String||Yes||SQL-Like Predicate that selects from the Trace Stream|