XmlBlaster Logo

REQUIREMENT

queue

XmlBlaster Logo


Type NEW
Priority HIGH
Status CLOSED
Topic Within XmlBlaster there is a complete queue framework offering generic plugin based storage. The queues can be persistent or transient.
Des
cription

Queues can (and are) used in different parts in xmlBlaster. On client side they are used to store the messages waiting to be delivered to xmlBlaster. This is commonly the case when the communication between client and server is temporarily down.

On the server side there are callback queues (also called update queues) to temporarily store messages waiting to be delivered, for example callbacks to client subscriptions or PtP messages, or to persistently store the messages in order to be able to recover after a server crash.

Another usage of queues within xmlBlaster is the storage of the history of messages, i.e. to store several publishes made on the same message-oid.

Queues are also used as swapping devices to free memory when memory consumption is high.

The different queue implementations used within xmlBlaster are plugins, so if you want some specific feature, or if you want to implement your own queue, this can be done.

Queue entries have priorities (from 0 to 9) and a guaranteed order of delivery within the same priority. This means that messages are sorted primary by priority: higher priority messages are the first ones extracted by a take, peek or remove action. The second ordering criteria applied is the uniqueId of the entry. The lower uniqueId are returned first (since normally this uniqueId is related to the timestamp, older entries are returned first).

Example
Java
These are example QoS of subscribe() invocations:
<qos>
   <queue maxEntries='10000' maxBytes='1000000000' onOverflow='deadMessage'/>
</qos>
       
Configure

These parameters allow to configure the queues.

Property Default Description Hot Impl
queue/defaultPlugin CACHE,1.0 specifies the type (or the alias name) and version of the plugin to be used as default if nothing else is specified yes yes
QueuePlugin [CACHE][1.0] org.xmlBlaster. util.queue.cache. CacheQueueInterceptorPlugin specifies the class to be used for this particular queue plugin (in this case the plugin offering caching facilities) yes yes
queue/maxEntries 1000 specifies the maximum number of entries allowed in this queue (if it is a persistent queue) yes yes
queue/maxEntriesCache 1000 specifies the maximum number of entries allowed in this queue (if the queue is a memory based queue like RAM queues) yes yes
queue/maxBytes 10485760 (10 MB) specifies the maximum total size in Bytes allowed for this queue (if it is a persistent queue) yes yes
queue/maxBytesCache 2097152 (2MB) specifies the maximum total size allowed in this queue (if the queue is a memory based queue like RAM queues) yes yes

NOTE: Configuration parameters are specified on command line (-someValue 17) or in the xmlBlaster.properties file (someValue=17). See requirement "util.property" for details.
Columns named Impl tells you if the feature is implemented.
Columns named Hot tells you if the configuration is changeable in hot operation.

See REQ queue.cache
See REQ queue.jdbc.commontable
See REQ queue.ram
See REQ queue.jdbc.oracle
See REQ queue.jdbc.postgres
See REQ queue.jdbc.sqlserver
See REQ client.c.queue
See REQ client.cpp.queue
See API org.xmlBlaster.util.queue.I_Queue
See API org.xmlBlaster.util.queue.QueuePluginManager
See API org.xmlBlaster.util.queue.I_QueueEntry
See API org.xmlBlaster.util.qos.storage.QueuePropertyBase
See API org.xmlBlaster.util.I_Plugin
See API org.xmlBlaster.util.Global
See TEST org.xmlBlaster.test.classtest.queue.I_QueueTest
See TEST org.xmlBlaster.test.classtest.queue.JdbcQueueTest

This page is generated from the requirement XML file xmlBlaster/doc/requirements/queue.xml

Back to overview