Re: Durable Topics and message expiry

Tim Anderson <[email protected]> Tue, 16 Oct 2007 14:20:23 +1000
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
George H wrote:
> Hi,
>
> I have this idea and I don't know how plausable it is to do with
> OpenJMS... So i'll run it by here and see the feedback :)
>
> I am thinking of implementing a Durable Topic on openjms that will
> hold a copy of messages that are sent to other clients. I want this
> topic to keep those messages indefinitely (set expiry date never to
> expire?) and I don't want the messages to disappear either once a
> subscriber has read them.
>
> The point being to create a "history topic" where subscribers can hook
> on to it, receive all messages in order from time X to current and
> then unsubscribe. But they can go back and check out the "history
> topic" again at any time.
>
> I haven't tried to do this but wondering if this is feesable to do
> with OpenJMS or if not I should just use a separate DB and a query.
>
> Thanks.
>   
OpenJMS holds onto persistent topic messages while there is a durable 
subscriber for the
topic that has not yet received it.
To do what you want, you could pre-register a durable subscriber for 
each topic that you want messages
retained for. This subscriber would never be used, but would ensure 
that  non-expiring messages
are never discarded.

-Tim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/