On 1/22/07, leonardinius <[EMAIL PROTECTED]> wrote:
Hi and sorry for my poor English skills, I have reached some problem. I have to post some message to some topic(dynamically created by request), which do not have any subscribers at all. I MUST HAVE to support message TTL (time to live) feature, among other I MUST HAVE to support another facility: at any time any could subscribe to this topic and SHOULD receive all the messages sent. -I-] If only one or more subscribers could be (already KNOWN), I could create durable subscriptions for them, then close them, then (on reqyuaet) open and consume, then unsubscribe. The problem is: a) I don't know subscribers and their count b) All the subscribers( even subscribed to this topic after it creation time, but before TTL ends up) SHOULD receive this message. -II-] I am thinking about <retroactive> feature usage, but as far I understand, it stores ALL the messages for the topic, so any DURABLE subscription to this topic would get ALL the messages, not just the messages sent to topic after the subscription made + those with TTL. Thanks a lot for any comments and recomendations!
I'd recommend using <retroactive> and just implementing your own strategy http://incubator.apache.org/activemq/retroactive-consumer.html http://incubator.apache.org/activemq/subscription-recovery-policy.html and implement your own subscription recovery policy... http://incubator.apache.org/activemq/maven/activemq-core/apidocs/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.html or you could go with the idea of using a single persistent subscription using a wildcard. e.g. to FOO.> then all your generated topics begin with FOO..> such as FOO.A or FOO.A.B.C.WHATNOT The only thing is I don't think we've yet implemented retroactive for durable subscriptions - so the first idea is probably the easiest (unless you wanna patch the code to support retroactive on persistent topics). -- James ------- http://radio.weblogs.com/0112098/