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

Re: PTD & Persistence ... le retour ;o)

cyrille giquello wrote:

Hi Marcel ,
it's again and again the same guy wich is polute your mailbox with the same subject !
;o) So, in some mail I tried to change the subject , for the same eternal problem. At each time you stopped the thread. Like if the subject is horrible ;o)


No it is not horrible, but i had no time at all to have a look
at it.

I try to look at it tomorrow.


What subject ?
When using Persistence Message and Destination Qos with ForceQueuing,
the persistent message file is never erased from filesystem.
To reproduce the problem just make a little modification in
in public void testPtUnknownDestination()
when Construct a message and send it to "Martin Unknown"
just add <isDurable /> in the Qos
code would be like :
// Construct a message and send it to "Martin Unknown"
String xmlKey = "<key oid='' contentMime='text/plain'>\n</key>";
String qos = "<qos> <isDurable /> " // <-- add just this flag
+" <destination queryType='EXACT'>" +receiverName
+" <ForceQueuing />" +
" </destination>"
So, I take my brain and go in the xmlBlaster engine to trace all the operations ...
look at that scenario :
1/ RequestBroker.loadPersistentMessages()
do a publish() of messages found in persistence folder.
2/ RequestBroker.publish()
if (publishQoS.isPubSubStyle()) {
}else if (publishQoS.isPTP_Style()) {
destinationClient.sendUpdate(); // <-- Go there
3/ ClientInfo.sendUpdate()
... client not logged ...
queueMessage(msgUnitWrapper, destination);
4/ ClientInfo.notifyAboutLogin() {
if (messageQueue != null) {
while (true) {
MessageUnitWrapper msgUnitWrapper = messageQueue.pull();
But at any time the PersistenceDriver will be notified that it has to erase a message.
It's why my last posted messages ask for a code guideline to decide where it is possible and the 'right place' to code this notification. I didn't found any idea, because ClientInfo seems to doesn't know the RequestBroker wich handled the persistenceDriver....
Perhaps ClientInfo can send a xmlBlaster message to the RequestBroker engine (without isDurable) to erase this knid of message ?? ;o)
Voilà Marcel ...
It's where I'm blocking when I try to design the system architecture for my current project.
Perhaps Guys who has developped the PersistenceDriver can get a idea about that ?
The rest of xmlBlaster is working fine.
I'll tell you more in few weeks when the project will be in test, online.

-- Marcel Ruff mailto:ruff at swand.lake.de http://www.lake.de/home/lake/swand/ http://www.xmlBlaster.org