XmlBlaster Logo



XmlBlaster Logo

Type NEW
Priority HIGH
Status OPEN
Topic PtX (Point to XPath) messages are routed using the qos-destination tag

If you specify a <destination queryType='XPATH'> tag, the message will be delivered to all clients, for which the XPATH query matches. Assuming that clients are stored in a dedicated authentication xmlBlaster server, every client can be described with meta information in the XmlKey. The XPATH queries the client meta info, and all matching clients will receive the message. This allows a smart addressing of client with specific roles or in specific groups. You may categorize some client with the <MANAGER> tag, and some with the "TRUSTED" attribute. This allows to send a message for example to all managers which are trusted.

The clients connection name should be in that kind, so I think the term 'key' is misleading here.

This is a requirement, we've been talking about before X-mas 2002. It allows to group clients with additional terms. For example Agents as publisher or Clients as subscriber.

The next step would be that those META-Tags have to be in the __sys__Login and __sys__Logout messages as well to monitor connections and disconnections of this particular client. Probably in the __sys__UserList message as well.


      Imagine your clients in xmlBlaster have following meta informations:
         <key oid='martin' contentMime='text/plain'>
            <MANAGER type='TRUSTED'>
               <SALARY type='HIGH' />

         <key oid='sabine' contentMime='text/plain'>
            <MANAGER type='TRUSTED'
               <SALARY type='OK_AS_WELL' />

      // Construct a message and send it to all MANAGER of type TRUSTED and to the CEO
      String xmlKey = "<key oid='' contentMime='text/plain'>\n" +

      String qos = "<qos>" +
                   "   <destination queryType='XPATH'>" +
                   "      //MANAGER[@type='trusted']" +
                   "   </destination>" +
                   "   <destination queryType='EXACT'>" +
                   "      CEO" +
                   "   </destination>" +

      content = "Should we sponsor open source?";
      MsgUnit msgUnit = new MsgUnit(glob, xmlKey, content, qos);
      try {
      } catch(XmlBlasterException e) {
         System.err.println("Failed to send message");

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.PtP
See REQ engine.LoginLogoutEvent
See API org.xmlBlaster.client.qos.PublishQos
See API org.xmlBlaster.client.key.PublishKey

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

Back to overview