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

Re: [xmlblaster-devel] About persistent and history



peng at qcet.cn wrote:
> Hello: 
>    I try to create a persistent topic(with long life) so every user
>first login and receive the Message once(just once);
>and if the user second login again,the xmlblaster does not post the Message to this user again.
> How can I write the key and Qos? 
Please look into:

   http://www.xmlblaster.org/xmlBlaster/doc/requirements/msgDistributor.plugin.ConsumableQueue.html

You should have a persistent session for each user and the
user should initially login and subscribe to the topic.
Like this the messages are collected for all clients even if
they are offline.
> 
>    And I have  Question about history,I create a persistent topic(with long life) ,
>I pub a message to this topic,after a while,I pub a other message to this topic again,
>then I use get(xa, "<key  queryType='XPATH'>//key</key>" , "<qos/>", &xmlBlasterException)
> method to get the messages, I get the last message only,why I can not get the message I first post?
Please see

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

and search for history.


The history depth is 10, you can adjust it on first publish, see

  http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.publish.html
see
  "<queue relating='history' type='CACHE' maxEntries='1000' ...

regards,
Marcel

PS: Have a look into xmlBlaster/demo/javaclients/HelloWorldSubscribe.java
    or xmlBlaster/demo/c++/SubscribeDemo.cpp for usage examples.


> 
> Thanks very much!
> 
> Peng
> 
> 
> 
> 


-- 
http://www.xmlBlaster.org