Universal Messaging 10.3 | Concepts | Commonly Used Features | Queue Attributes
 
Queue Attributes
Universal Messaging queues provide 3 main attributes. Depending on the options chosen, these define the behavior of the events published and stored by the Universal Messaging realm server. The availability of the events on a queue is defined by the chosen attributes of the queue upon creation.
Each of these attributes are described in the following sections.
Queue TTL
The TTL for a queue defines how long (in milliseconds) each event published to the queue will remain available to consumers. Specifying a TTL of 0 will mean that events will remain on the queue indefinitely. If you specify a TTL of 10000, then after each event has been on the queue for 10000 milliseconds, it will be automatically removed by the server.
Queue Capacity
The capacity of a queue defines the maximum number of events that may remain on a queue once published. Specifying a capacity of 0 will mean that there is no limit to the number of events on a queue. If you specify a capacity of 10000, then if there are 10000 events on a queue, and another event is published to the queue, the 1st event will be automatically removed by the server.
Queue Type
Each queue has an associated queue type. A Universal Messaging queue can be one of the types shown in the following table. The difference between the types lies in the type of physical storage used for each type and the performance overhead associated with each type.
Queue Type
Description
Simple
Simple queues have their messages stored in the Universal Messaging realm's own memory space, thus supplying a high-speed queue type. The difference between Simple and Reliable is that the event IDs are reset to 0 in a Simple queue whenever the Universal Messaging server is restarted.
Simple queues are not supported across realms in a cluster.
Reliable
Reliable queues have their messages stored in the Universal Messaging realm's own memory space. The first fact that is implied is that the maximum number of bytes that all messages across all Reliable queues within a Universal Messaging realm is limited by the maximum heap size available to the Java Virtual Machine hosting that realm. The second fact implied is that if the Universal Messaging realm is restarted for any reason, all messages stored on Reliable queues will be removed from the queue as a matter of policy. However, as Universal Messaging guarantees not to ever reuse event IDs within a queue, new messages published in those queues will get assigned event IDs incremented from the event ID of the last message prior to the previous instance stopping.
Persistent
Persistent queues have their messages stored in the Universal Messaging realm's persistent queue disk-based store. The persistent queue store is a high performance file-based store that uses one or more files for each queue on that realm, thus facilitating migrating whole queues to different realms.
For information about setting up a multi-file disk store for persistent channels or persistent queues, see the section Multi-File Disk Stores.
All messages published to a Persistent queue will be stored to disk, hence it is guaranteed that they will be kept and delivered to subscribers until it is purged or removed as a result of a "Time to Live" (TTL) or capacity policy.
Messages purged from a Persistent queue are marked as deleted, however the store size will not be reduced immediately. If the store is backed by a single file, the store size will not be reduced until maintenance is performed on the queue using the Universal Messaging Enterprise Manager or an Administration API call. Stores backed by multiple files will be cleaned up through the removal of individual files, according to the conditions described in the section Multi-File Disk Stores. This augments the high performance of the Universal Messaging realm.
Mixed
Mixed queues allow users to specify whether the event is stored persistently or in memory, as well as the "Time To Live" (TTL) of the individual event. On construction of a Mixed queue, the TTL and Capacity can be set, and if the user supplies a TTL for an event this is used instead of the queue. Events stored persistently are either stored on a single file or on multiple files in the same manner as a Persistent queue.
Transient
A Transient queue is like a Simple queue in that no event characteristics are stored persistently. In addition to this, data is only ever written to a Transient queue when 1 or more consumers are connected to the queue and are able to consume this data. Unlike the Simple queue which stores event data in memory, Transient queues do not store anything, not even in memory. Transient queues can be thought of as a relay between 1 or more publishers and 1 or more subscribers.
Transient queues are not supported across realms in a cluster.
Off-heap
Off-heap queues, similar to Reliable queues, store the events in memory, but this queue type uses off-heap memory. This allows the normal JVM heap memory to be left free for short lived events, while longer living events can be stored off the JVM heap. This reduces the work the garbage collector needs to do to manage these events since they are out of range of the garbage collector.
Paged
Paged queues allows users access to high speed, off-heap memory mapped files as the basis for the event storage. As for the other queue types, each queue has its own unique file mapping. While similar to the Off-heap queue type, where the events are stored in the off heap memory, the Paged queue store is also persistent, thereby allowing recovery of events that are written into this store.
Note:
The following queue types are deprecated in Universal Messaging v10.2 and will be removed in a future version of the product: Simple, Paged, Offheap.