XmlBlaster Logo



XmlBlaster Logo

Type NEW
Priority HIGH
Topic State charts and configuration of message and topic lifecycles

In xmlBlaster we define a topic as a single key oid whereas a message instances are the single messages published (probably with identical oid). The message instances build a history queue of a topic.

Message lifecycle overview

Message lifecycle overview

Every message key oid defines a topic. You publish any number of messages with the same oid, those MsgUnit instances are distinguished by the unique receive timestamp.

The messages are queryable from the history queue. The history queue only contains references to the real messageUnit.

Every subscription puts a reference of a messageUnit into the client specific callback queue, from where the messages are sent to the client.

The real messageUnit (the meat) is handled by the cache implementation. The pointers on the cache entries are reference counted. If no weak reference exists anymore the cache entry is destroyed.

If a cache entry is swapped to harddisk, the weak references are set to null by the Java virtual machine. In this case, the access forces a lookup and the message is swapped back to the cache.

The logical states of a topic (= messages with same key oid)

Lifecycle of an xmlBlaster topic

The above states break down to internal conditions.

Internal conditions of a topic:

state Is visible?
XPATH queries are possible
has BigXmlDom entry
Referenced by
history queue
Referenced by
callback queue
Has EXACT subscriptions (*)
alive true true true true
alive true true true false
alive true true false true
alive true true false false
alive true false true true
alive true false true false
alive true false false true
unreferenced true false false false
invalid false true true true
invalid false true true false
invalid false true false true
invalid false true false false
invalid false false true true
softErased false false true false
unconfigured false false false true
start/dead false false false false

(*) XPATH subscriptions don't prevent the topic from going to DEAD

Possible states of a message instance:

Lifecycle of an xmlBlaster message instance

The configuration of topics and messages are done by publishing a message and setting certain publish QoS tags:

Topic and message scope of a publish QoS

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 API org.xmlBlaster.util.qos.MsgQosSaxFactory
See REQ interface.publish
See REQ engine.message
See TEST org.xmlBlaster.test.topic.TestTopicLifeCycle

This page is generated from the requirement XML file xmlBlaster/doc/requirements/engine.message.lifecycle.xml

Back to overview