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

[xmlblaster] Retrieve an external custom property in the '__sys__Event' messag e



Hi,

I want to capture the two following evenTypes : topic/*/event/subscribe and
topic/*/event/unSubscribe 

Following the advice of the REQ admin.event, my client (subscribing to
__sys__Event) receives effectively an event like the following when another
client invokes the subscribe() method :

 <key oid='__sys__Event' contentMimeExtended='1.0'>
  <org.xmlBlaster><event/></org.xmlBlaster>
 </key>
 <content size='23'>topic/*/event/subscribe</content>
 <qos>
  <clientProperty
name='_subscriptionId'>__subId:heron-1136812798913000000</clientProperty>
  <clientProperty name='_nodeId'>heron</clientProperty>
  <clientProperty name='_description' encoding='base64'>...</clientProperty>
  <clientProperty name='_eventType'>topic/*/event/subscribe</clientProperty>
  <clientProperty name='_summary'>New subscription of client
/node/heron/client/joe/1 on topic airport</clientProperty>
  <clientProperty name='_publicSessionId' type='long'>1</clientProperty>
  <clientProperty name='_subjectId'>joe</clientProperty>
  <clientProperty
name='_absoluteName'>/node/heron/client/joe/1</clientProperty>
  <clientProperty name='_topicId'>airport</clientProperty>
 </qos>

My problem: 
I would like to retrieve a custom property set by the subscriber (who
invokes the subscribe() method) in the qos part of the previous message.

For example, a subscriber set a property like myProperty=1234 then call
con.subscribe() and I would like to receive a message like the following :

 <key oid='__sys__Event' contentMimeExtended='1.0'>
  <org.xmlBlaster><event/></org.xmlBlaster>
 </key>
 <content size='23'>topic/*/event/subscribe</content>
 <qos>
  <clientProperty
name='_subscriptionId'>__subId:heron-1136812798913000000</clientProperty>
  <clientProperty name='_nodeId'>heron</clientProperty>
  <clientProperty name='_description' encoding='base64'>...</clientProperty>
  <clientProperty name='_eventType'>topic/*/event/subscribe</clientProperty>
  <clientProperty name='_summary'>New subscription of client
/node/heron/client/joe/1 on topic airport</clientProperty>
  <clientProperty name='_publicSessionId' type='long'>1</clientProperty>
  <clientProperty name='_subjectId'>joe</clientProperty>
  <clientProperty
name='_absoluteName'>/node/heron/client/joe/1</clientProperty>
  <clientProperty name='_topicId'>airport</clientProperty>
  <clientProperty name='myProperty'>1234</clientProperty>
 </qos>

Is there any solution for my problem or any way to implement this sort of
functionality ? 

Thanks.