XmlBlaster Logo

REQUIREMENT

queue.cache

XmlBlaster Logo


Type NEW
Priority HIGH
Status CLOSED
Topic XmlBlaster provides a generic cache plugin for storing queue entries on a database and at the same offer caching facility for better performance.
Des
cription

The CacheQueueInterceptorPlugin offers the ability to store messages persistently on databases. In case a crash occurs, data will be recovered. Since it embeds a jdbc queue and a ram queue, it has the ability to cache entries on ram, improving this way the performance. On demand it is possible to inhibit swapping.

Here follows a graphical explanation about the caching mechanism. cacheQueue

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

These parameters allow to configure a cache queue, the 'queueName' needs to be replaced by 'history', 'callback' or 'subject' to configure those specific queues or additionally by 'connection' on client side to configure the client side tail back queue.

Property Default Description Hot Impl
QueuePlugin[CACHE][1.0] org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin specifies the cache implementing class to be used yes yes
queue/'queueName'/maxEntries queue/history/maxEntries = 1000 specifies the maximum number of entries allowed in the persistence portion of this queue yes yes
queue/'queueName'/maxBytes 10485760L (10MB) specifies the maximum total size for the persistence portion allowed in this queue yes yes
queue/'queueName'/maxEntriesCache 1000 specifies the maximum number of entries allowed in the RAM portion of this queue yes yes
queue/'queueName'/maxBytesCache 2097152 (2MB) specifies the maximum total size for the RAM portion allowed in this queue yes yes
queue/cache.storeSwapLevel 70 % of the cacheMaxBytes in bytes The level in bytes over which the cache queue starts swapping, i.e. it will start to take from the ram and put in jdbc storage. no no
queue/cache.storeSwapBytes 25 % of the cacheMaxBytes in bytes The amount in bytes to swap each time data must be moved from ram to jdbc storage. no no
queue/cache.reloadSwapLevel 30 % of the cacheMaxBytes in bytes The level in bytes under which which the cache queue starts reloading data from the persistence and puts it in the ram queue. no no
queue/cache.reloadSwapBytes 25 % of the cacheMaxBytes in bytes The amount in bytes to swap each time data must be moved from jdbc to ram storage. no no
queue/'queueName'/defaultPlugin queue/callback/defaultPlugin = CACHE,1.0 The default implementation to be used for queues, it defaults to the here described cache plugin. no yes
Additionally the configuration parameters for the ram queue and the jdbc queue must be defined.

These parameters allow to configure a cache queue statically when declared, for example in xmlBlaster.properties:

StoragePlugin[CACHE][1.0]=org.xmlBlaster.engine.msgstore.cache.PersistenceCachePlugin,persistentQueue=JDBC,transientQueue=RAM
      
Property Default Description Hot Impl
transientQueue RAM,1.0 The implementation to be used for the transient portion of the cache queue. no yes
persistentQueue JDBC,1.0 The implementation to be used for the persistent portion of the cache queue. no 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
See REQ queue.jdbc.commontable
See REQ queue.jdbc.oracle
See REQ queue.jdbc.postgres
See REQ queue.ram
See API org.xmlBlaster.util.queue.I_Queue
See API org.xmlBlaster.util.queue.jdbc.CacheQueuePlugin
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
See TEST org.xmlBlaster.test.classtest.queue.CacheQueueTest

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

Back to overview