High Quality JMS Messaging.

Queue Controller

SwiftMQ 4.5.0 introduces queue controllers for system queues. The configuration of system queues in prior releases was done via the default attributes for cache-size, flow control start queue size, etc. This was a limitation, because a change to e.g. the cache size had effect to all system queues, means temp. queues, routing queues and so on.

Now, the entities to control such system queues are the queue controllers. In principle, a queue controller contains attributes such as cache size, persistence mode etc. It also contains an attribute called "predicate" which is a SQL-Like predicate. Whenever a system queue is created, the predicate of all queue controllers are applied to the queue name in lexical order in which the controllers are defined, so the name of the controller decides the order here. If the predicate matches, the controller's attributes are used to create the system queue. Furthermore, the queue is attached to the controller and subsequent changes on the controller's attributes are immediately applied to all attached system queues. Thus, a queue controller controls those system queue which are created from the controller. Since queue controllers can be defined with any predicate and in any order, it gives maximum flexibility and control over system queues.

Queue controllers are located in the folder "System Queue Controllers" (name in the configuration file is "queue-controllers"):

These controllers are predefined. Changes requires a restart of the router. The following table lists the predefined controllers and their meanings:

Name Predicate Matches for
01 tmp$% Temporary queues and non-durable subscribers.
02 sys$% System queues like "sys$topic", "sys$scheduler".
03 swiftmq% Exported system queues like "swiftmqmgmt", "swiftmqscheduler".
04 rt$% Routing queues like "rt$router2".
05 unroutable Routing deadletter queue "unroutable".
06 %$% Durable subscriber queues <clientid>$<durablename>.
07 routerdlq The router deadletter queue "routerdlq".
08 % Everything. This is just a fallback controller if nothing matches.

The current settings for each queue can be viewed in the "Usage" folder of the Queue Manager Swiftlet. Select it, right mouse click, and choose "Show Entity Table":

Now the folder is shown as a table:

Let's assume that you want to disable the cleanup of expired messages for temporary queues. Go to the "System Queue Controller" folder, select the controller with name "01". As you see from the "Predicate", it is the controller for temp queues. Change the "Cleanup Interval" attribute to "-1":

Now look at the "Usage" table frame. All temporary queues have a cleanup interval of -1, so the cleanup for temporary queues has been disabled: