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

Publish and Subscribe question



This is a followup on some of my previous questions - Everything has worked wonderfully so far, I just need some clarification on publishing and subscribing clients.

I have been able to publish XML documents via the xmlKey and query on the document with an XPath expression. I am using derivatives of the org.xmlBlaster.client.feeder.PublishFile and ..client.reader.SubscribeMessage client programs. Let's call them MyPublish and MySubscribe respectively.

1. Does client order matter?
For example, I get a "null" pointer exception if I first run the MyPublish the client followed by the MySubscribe client. The exception occurs in the RequestBroker.subscribeToOid method because the xmlKey object is null.


If I run MySubscribe first followed by the MyPublish, the XML document is successfully passed to the subscribing client. I was under the impression that the messages were persistent with xmlBlaster, so the order in which clients interacted didn't matter. The following are the commandline options I was using - perhaps I have the Qos options incorrect.

First: jaco MyPublish -k MyXmlFile.xml -content " "

Second: jaco MySubscribe -xpath "//[ at oid=\"410\"]"

If I restart the xmlBlaster server and run the clients in reverse order (i.e. MySubscribe and then MyPublish) I don't get the null pointer exception and the client receives the XML document via the xmlKey parameter.


2. How can I publish multiple XML documents from the same client?

Another problem occurs after I start MySubscribe client and try to send multiple XML files using the MyPublish client. MySubscribe client receives the first XML message fine, but subsequent messages are not received by the client even when the XPath is still valid. Shouldn't xmlBlaster notify the client when a new message is received by another publisher?


Any help would again be appreciated.

Thanks,


Brett

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com