Every subscription returns a unique handle namely the subscription ID. This is used to refer to exact this subscription on updated messages or un unsubscribe requests.
This subscription ID is uniquely generated by xmlBlaster. On demand you can force xmlBlaster to use a subscription ID which is given by the subscriber. This subscription ID should be unique in the whole cluster environment, a proposed syntax is:
"__subId:client/[loginName]/session/[publicSessionId]-[your number or id]"
Example:
<qos> <id>__subId:client/subscriber/session/2-13340998000</id> ... </qos>
For java clients there is a prefix constant in org.xmlBlaster.util.def.Constants.java which you can use to build a unique subscription ID:
public final static String SUBSCRIPTIONID_PREFIX = "__subId:";
If you have a fail safe client configured, using a positive session id (e.g. 'client/joe/session/1') and the subscription flag multiSubscribe is set to false, the java and C++ client library will automaticaly generate a subscriptionId which won't change on next restart of the client and which will be used by the server. The syntax is like:
__subId:[relativeSessionName]-[subscriptionUrl] __subId:client/subscriber/session/2-exact:Hello
Benefit: If on client restart we are queueing the returned faked subscriptionId will match the later used one of the xmlBlaster server. We can easily use the subscriptionId as a key in a client code hashtable to dispatch update() messages.
Note: multiSubscribe==false allows max one subscription on a topic, even it has different mime query plugins (the latest wins).
, sq.toXml()); } catch (Exception e) { ... } ... ]]>