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

Re: [xmlblaster-devel] Trouble with multiple subscibtions/callbacks

Wolfgang Kleinertz wrote:

I'm writing a program that uses an own callback for each subscibtion.
The problem is, that incomming messages won't be delivered to the
specialized callback. Instead, the default callback (registered while
login) gets the message, although
no subscribtion is running for this callback. Why?

An examples of an addressed message key:
  <key oid='agent-' contentMime='text/xml/'
      <location source='agent-' driver='FRT1'  />

The XPath-query I use to subscribe:
//key[ at contentMimeExtended='log']/location[ at source='agent-'
at driver='FRT1']

The analysis of the problem showed the following:
The returned subscibtionId is:

An incomming message needs the same id to be dispatched to the right
callback, but they are not the same. (An id of an incomming msg. was
'agent-' == oid!!!!)

Thus, if the oid of the key is set to a value, the msg can't be
dispatched via
org.xmlBlaster.client.protocol.xmlBlasterConnection.update(...) to the
right callback. If I don't use a msg-oid, it works well. But that's no
solution, because I need the oid to avoid more than one message per

I think, it's not a feature, it's a bug. Isn't it?! :)

I don't understand all of it. On subscribe you recevie a subscription ID (as yours above). Messages which arrive via update() have for example this QoS:

   <qos> <!-- UpdateQoS -->

      <rcvTimestamp millis='1014638547647' nanos='0'>
         2002-02-25 13:02:27.647
      <expiration timeToLive='129599952'/>

They deliver the reason for their arrival in form of a subscriptionId.
This should match to the id you got returned on subscribe().
If not, it is a bug.
But in my tests it runs fine.



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