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

Re: [xmlblaster] RE:RE: Durable subscriptions



pikaiyuan wrote:
> Thanks for your help, but i was still puzzled by the following phenomenon:
> 
> 
> The whole process is as following:
> 
> 1: Run the publisher : java javaclients.HelloWorldPublish -numPublish 100
> 
> it display the following:
> 
> 
>        [2003-8-17 11:08:16 INFO  HelloWorldPublish] Hit a key to publish 'Hello' #1/100
>  
>  
> I hit a key, and it display the following:
> 
> 
> 
> [2003-8-17 11:08:46 INFO  HelloWorldPublish] Added TopicProperty on first publish:
>  <topic readonly='false' destroyDelay='60000' createDomEntry='true'>
>   <queue relating='history' maxEntries='100000' maxEntriesCache='100000'/>
>  </topic>
> [2003-8-17 11:08:46 INFO  HelloWorldPublish] #1/100: Got status='OK' rcvTimestamp=2003-08-17 11:0
> 8:46.701000001 for published message 'Hello'
> [2003-8-17 11:08:46 INFO  HelloWorldPublish] Hit a key to publish 'Hello' #2/100
> [2003-8-17 11:08:46 INFO  HelloWorldPublish] #2/100: Got status='OK' rcvTimestamp=2003-08-17 11:0
> 8:46.731000001 for published message 'Hello'
> [2003-8-17 11:08:46 INFO  HelloWorldPublish] Hit a key to publish 'Hello' #3/100
> 
> 
> 
> 2:Run the subscriber: 
> java javaclients.HelloWorldSubscribe -session.name  joe/2  
>    -dispatch/callback/retries -1 -multiSubscribe false  -dispatch/callback/pingInterval 2000
> 
> it display the following 
> 
>    [2003-8-17 11:09:18 INFO  HelloWorldSubscribe] Hit a key to subscribe 'Hello'
>   
>   
> I kit a key, and it display the following: (I change the HelloWorldPulisher code to setclientTag with number increasement with 1, so the demo1 is display)
> 
> 
> ============= START #1 'Hello' =======================
> [2003-8-17 11:09:43 INFO  HelloWorldSubscribe] Receiving update #1 of a message ...
> <xmlBlaster>
> 
>  <key oid='Hello' contentMime='text/xml' contentMimeExtended='1.0'>
>   <org.xmlBlaster><demo1></demo1></org.xmlBlaster>
>  </key>
> 
> <content>
> Hi
> </content>
> 
>  <qos>
>   <subscribeable/>
>   <sender>/node/xmlBlaster_192_168_80_11_3412/client/Administrator/-6</sender>
>   <subscribe id='__subId:5'/>
>   <expiration lifeTime='-1' forceDestroy='false'/>
>   <rcvTimestamp nanos='1061089726731000001'/>
>   <queue index='0' size='1'/>
>   <persistent/>
>   <isUpdate/>
>  </qos>
> </xmlBlaster>
> ============= END #1 'Hello' =========================
> 
> 3: I repeat step2 , it still display demo1, not the demo2,
>    In my opinion, the durable subscriber will receive the remaining message, not the same message  have been received before.

I have changed HelloWorldPublish: if you have '%counter' tokens
in your clientTags or in the given message content it is replaced
by the current message number (it is in cvs).

Here is the output of the subcriber:

============= START #1 'Hello' =======================
[Aug 17, 2003 1:05:32 PM INFO  HelloWorldSubscribe] Receiving update #1 of a message ...
<xmlBlaster>

 <key oid='Hello' contentMime='text/xml' contentMimeExtended='1.0'>
  <org.xmlBlaster><demo-1></demo-1></org.xmlBlaster>
 </key>

<content>
Hi-1
</content>

 <qos>
  <subscribeable/>
  <sender>/node/xmlBlaster_192_168_1_4_3412/client/xmlblast/-2</sender>
  <subscribe id='__subId:2'/>
  <expiration lifeTime='-1' forceDestroy='false'/>
  <rcvTimestamp nanos='1061118331928000001'/>
  <queue index='0' size='1'/>
  <persistent/>
  <isUpdate/>
 </qos>
</xmlBlaster>
============= END #1 'Hello' =========================


============= START #2 'Hello' =======================
[Aug 17, 2003 1:06:06 PM INFO  HelloWorldSubscribe] Receiving update #2 of a message ...
<xmlBlaster>

 <key oid='Hello' contentMime='text/xml' contentMimeExtended='1.0'>
  <org.xmlBlaster><demo-2></demo-2></org.xmlBlaster>
 </key>

<content>
Hi-2
</content>

 <qos>
  <subscribeable/>
  <sender>/node/xmlBlaster_192_168_1_4_3412/client/xmlblast/-2</sender>
  <subscribe id='__subId:2'/>
  <expiration lifeTime='-1' forceDestroy='false'/>
  <rcvTimestamp nanos='1061118365829000001'/>
  <queue index='0' size='1'/>
  <persistent/>
  <isUpdate/>
 </qos>
</xmlBlaster>
============= END #2 'Hello' =========================


============= START #3 'Hello' =======================
[Aug 17, 2003 1:06:07 PM INFO  HelloWorldSubscribe] Receiving update #3 of a message ...
<xmlBlaster>

 <key oid='Hello' contentMime='text/xml' contentMimeExtended='1.0'>
  <org.xmlBlaster><demo-3></demo-3></org.xmlBlaster>
 </key>

<content>
Hi-3
</content>

 <qos>
  <subscribeable/>
  <sender>/node/xmlBlaster_192_168_1_4_3412/client/xmlblast/-2</sender>
  <subscribe id='__subId:2'/>
  <expiration lifeTime='-1' forceDestroy='false'/>
  <rcvTimestamp nanos='1061118366979000001'/>
  <queue index='0' size='1'/>
...



'demo-%counter' and 'Hi-%counter' increments
nicely as expected, can you please try
with the HelloWorldPublish.java from cvs?

regards

Marcel

-- 
http://www.xmlBlaster.org