activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Message persistence for Topics
Date Mon, 08 Nov 2010 23:42:49 GMT
For default message persistence there needs to be a durable
subscription. For non durable subscriptions there is the retroactive
option that will allow recovery of messages based on
the recovery strategy. You can define your own strategy to capture
your exact requirement, there are a few out of the box (limited by
message count and message size) but none that monitor expiry.
see: http://activemq.apache.org/subscription-recovery-policy.html

On 8 November 2010 23:00, Anirudha Khanna <anirudha@yahoo-inc.com> wrote:
> Hi,
>
> I am a developer working for Yahoo! Inc. and we are currently evaluating ActiveMQ for
using it as streaming solution for Yahoo serving applications. We have a requirement for the
streaming platform to be able to persist messages on a topic, till the set message expiry
is up, even though there isn't a durable subscriber for that Topic. Is it sufficient for the
Producer to do a Producer.setDeliveryMode(DeliveryMode.PERSISTENT) to get this behaviour?
When reading source I did notice this section in org.apache.activemq.broker.region.Topic.java
>
> if (topicStore != null && message.isPersistent() && !canOptimizeOutPersistence())
{
>            if (systemUsage.getStoreUsage().isFull()) {
>                final String logMessage = "Usage Manager Store is Full. Stopping
producer (" + message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName()
+ "."
>                        + " See http://activemq.apache.org/producer-flow-control.html
for more info";
>                if (systemUsage.isSendFailIfNoSpace()) {
>                    throw new javax.jms.ResourceAllocationException(logMessage);
>                }
>
>                waitForSpace(context, systemUsage.getStoreUsage(), logMessage);
>            }
>            topicStore.addMessage(context, message);
> }
>
> private boolean canOptimizeOutPersistence() {
>        return durableSubcribers.size() == 0;
> }
>
>
>
> ActiveMQ version 5.3.2
> JAVA version 1.6_0.22
> OS - RHEL 4 Update 8
>
> Thanks,
> Anirudha
>



-- 
http://blog.garytully.com
http://fusesource.com

Mime
View raw message