XmlBlaster Logo

REQUIREMENT

engine.qos.publish.destination.offline

XmlBlaster Logo


Type NEW
Priority LOW
Status CLOSED
Topic If the receiver of a PtP message is offline or has no callback the behavior is configurable
Des
cription

If you send a message to a named destination, using the qos <destination> tag, and there is no callback for this receiver, or the receiver is not logged in and the forceQueuing qos attribute is not set in this message, you get an XmlBlasterException.

Having forceQueuing=true the behavior is as follows.
Messages for a destination are stored in a queue called subject queue. The subject queue holds a reference only which points the the real message which is stored in the message store:

QoS Setting Destination client Behavior
Destination without pubSessionId (e.g. 'client/joe') Connected (callback is ALIVE or POLLING) If the destination client is connected one or multiple times all connected sessions receive the message.
If the destination client disappears before the message is delivered (the session is destroyed) it is put back to the subject queue of joe
Destination without pubSessionId (e.g. 'client/joe') Not connected If the destination client is not connected the message is queued in the subject queue of joe. If joe connects, the queued message is delivered automatically to its callback address.
Destination with pubSessionId (e.g. 'client/joe/2') joe/2 is online (callback is ALIVE or POLLING) The message is delivered directly (ALIVE) or queued in the callback queue of joe's session number 2 (POLLING).
If the callback goes to DEAD or the session times out before the message was delivered the message will be published as DEAD MESSAGE.
Destination with pubSessionId (e.g. 'client/joe/2') Not connected The publisher gets an exception, the message is not delivered.

In a future version of xmlBlaster we should provide a plugin framework to control the delivery behavior of PtP messages in any way. A default plugin should support a load balancing delivery of PtP messages to exactly one receiver.

Example
Java
      
// Construct a message and send it to 'Michelle', she is currently not logged in
String xmlKey = "<key oid='' contentMime='text/plain'/>";

String qos = "<qos>" +
             "   <destination forceQueuing='false'>" +
             "      client/Michelle/2" +
             "   </destination>" +
             "</qos>";

content = "Hi Michelle";
MsgUnit msgUnit = new MsgUnit(glob, xmlKey, content.getBytes(), qos);
try {
   xmlBlaster.publish(msgUnit);
} catch(XmlBlasterException e) {
   System.out.println("Exception is correct, Michelle is not logged in");
}
      
   
Configure

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 engine.qos.publish.destination.ForceQueuing
See REQ engine.qos.publish.destination.PtP
See REQ cluster.PtP
See REQ interface.publish
See API org.xmlBlaster.client.qos.PublishQos
See API org.xmlBlaster.client.key.PublishKey
See TEST org.xmlBlaster.test.qos.TestPtDQueue

This page is generated from the requirement XML file xmlBlaster/doc/requirements/engine.qos.publish.destination.offline.xml

Back to overview