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

Re: [xmlblaster] question about queue in xmlBlaster



zhang zhi wei wrote:
> Question 1:
> 1. run the  "java HelloWorldPublish -numPublish 100 -persistent true" 
> command, and then in the XB_ENTRIES , there are two queues:  
> msgUnitStore_xmlBlaster_10_0_0_239_3412Hello and 
> history_inforMessaging_10_0_0_239_3412Hello
> 2. run  "java HelloWorldSubscribe -session.name joe/2  
> -dispatch/callback/retries -1 -multiSubscribe false 
> -dispatch/callback/pingInterval 2000 -interactiveUpdate true 
> -historyNumUpdates 0 "
>   two more queue are created :
>    callback_nodexmlBlaster_10_0_0_239_3412clientjoe2 and
>    subject_nodexmlBlaster_10_0_0_239_3412clientjoe
>       the first queue is used for  callback queue ,    what's the 
> purpose of the second queue, say   
> subject_nodexmlBlaster_10_0_0_239_3412clientjoe ?
>    and what are the contents of the   
> subject_nodexmlBlaster_10_0_0_239_3412clientjoe??

The first picture of

 http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.message.lifecycle.html

shows the queues.

Additionally we have subject queues:
The subject queue is the queue of a client. E.g. if you login two
clients with 'joe/2' and 'joe/3' the subject 'joe' has a exactly
one 'subject queue'. This queue holds point to point messages
even if no 'joe' is logged in.

More infos about subject queues are in

 http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.queue.html
http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.qos.publish.destination.offline.html
http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.qos.publish.destination.ForceQueuing.html


>    Question 2;
>   The real message is in msgUnitStore   and history queue and callback 
> queue are only references to real message.
>     the question is :
>     when a publisher publish a message, will the message be fist put 
> into msgUnitStore,
>     and then callback queue , and then history queue?
>       I have see the doc in the requirements directory and still was 
> puzzled by this procedure can you explain this to me?

The implementation of this is in
xmlBlaster/src/java/org/xmlBlaster/engine/TopicHandler.java:publish()

First the message is put into the

  msgUnitStore and a reference into the historyQueue.

Later all subscribers get a reference into their

  callbackQueues

Note: If the server is swapping messages to the harddisk
the callback queues hold the complete message (not
a reference anymore) on reload.


regards

Marcel

-- 
http://www.xmlBlaster.org