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

Re: [xmlblaster] message expiration event



Joanne wrote:
Joanne wrote:
Is there a special syntax for subscribing to message expiration events? I'd like to have a client that listens for message expiration events on a specific topic.





Marcel wrote:
You can receive topic erase/expire events but
you can't subscribe on message instance expiry.


Does it go by the general the rule that message subscribers automatically receive corresponding expire events just like they do with erase events?

For example, in my client subscription I use <notify>false</notify> in the subscribe qos
> and disabled my client's async dispatcher by setting
?dispatcherActive=false. I don't care about erase events for my subscription,
> and I only use synchronous get methods for processing messages within its callback queue.
> However, I would like to be notified when a message in my subscription expires.
> Using the existing framework, how can I enable receiving expire events on this subscription?
> I'm hoping the expire event is not linked to the erase event (i.e. I hope I can receive the
> expire event without the erase notification).


The setup is like this:

  - One Cluster has N xmlBlaster nodes
  - One xmlBlaster node has N topics
  - One Topic has one history queue which contains most maxEntries message units
  - Every client session has zero or one callback queues depending
    on the ConnectQos.
  - Every subscribe on a topic delivers the message instances
    to the callback queue of this client session unless
    a mime plugin filters it away

  (message unit or message instance is the same in this context)

  The message units are kept in the history queue
  of the topic if the history queue maxEntries is bigger 0 and
  if they are not expired (finally they fall out the back of the
  history queue).

  The callback queue of a client receives the message
  if the clients session has subscribed on the topic or if the message
  is a PtP message with the clients destination.

If a topic disappears and you are a subscriber you receive an erase event
unless you have set <notify>false</notify>.

If a message unit disappears you receive nothing.
A message unit disappears if it expires or if
it falls out at the back of the history queue or
it a topic is erased.
If you need a message unit expire event you need to
extend the xmlBlaster core as described in the last
mail and add a little native client to handle this
event to your needs,

regards

Marcel



--
http://www.xmlBlaster.org