[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xmlblaster] Does XPATH filter apply to ClientTags?



OK, I think there's something wrong here...

I fired up a client and subscribed to messages for agent_200.  I publish
messages to agent_200 and they arrive and are counted in the GUI.  So far,
so good.

I open another instance of the GUI and subscribe to messages for agent_300.
I publish messages to agent_300... But the original GUI (subscribed to
messages for agent_200) receives them!  The new GUI gets nothing.  I was
expecting to be able to send some messages to the original GUI, and some to
the new GUI, based on the information in the clientTags and the xpath query
each GUI had established (i.e. their subscription).

I go to the xmlBlaster GUI and run an xpath query like this:

//*[contains(name(),'agent_200')]

And it returns this:

### XmlKey:

<key oid='agent_3000' contentMime='text/xml' contentMimeExtended='1.0'>
 <org.xmlBlaster><demo></demo><agent_300>test</agent_300></org.xmlBlaster>
</key>
### Content:
<agent_696>test</agent_696>

Hi Bret,

i think the problem is here:

===========================================================
DUMP [RequestBroker-/node/xmlBlaster_192_168_0_6_3412] Receiving  message in
publish()

 <key oid='agent_3000' contentMime='text/xml' contentMimeExtended='1.0'>

<org.xmlBlaster><demo></demo><agent_200>test</agent_200></org.xmlBlaster>
 </key>
  <content><![CDATA[<agent_696>test</agent_696>]]></content>
===========================================================

You publish a first message 'agent_3000' with a meta tag 'agent_200'.
This way the internal DOM of the topic 'agent_3000' looks like this:

===========================================================
...
<key oid="agent_3000" contentMime="text/xml" contentMimeExtended="1.0">
<org.xmlBlaster>
<demo />
<agent_200>test</agent_200>
</org.xmlBlaster>
</key>
...
===========================================================


This internal DOM tree is IMMUTABLE, meaning the DOM
will not be refreshed (for performance and other reasons)
when you send later oid='agent_3000' messages with DIFFERENT
meta markup. The first message of a specific oid creates
the topic (you can look at it as an administrative message).

Later you send messages like:

===========================================================
  <MsgUnitWrapper id='agent_3000/2003-06-19 12:50:17.508000001'
referenceCount='1' state='ALIVE'>
    <key oid='agent_3000' contentMime='text/xml' contentMimeExtended='1.0'>

<org.xmlBlaster><demo></demo><agent_300>test</agent_300></org.xmlBlaster>
    </key>
     <content><![CDATA[<agent_696>test</agent_696>]]></content>
===========================================================

Their meta tags changed, but this will not change the DOM
entry of the topic (a topic are message collectives with
the same oid).

Please see

http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.publish.html



hope it helps, best regards


Marcel