activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Support for setting default message expiry for MQTT messages
Date Tue, 29 Mar 2016 14:42:17 GMT
On 03/29/2016 09:54 AM, Shobhana wrote:
> Hi,
>
> We use AMQ 5.13.1 and connect to AMQ using Eclipse Paho's MQTT V3 client lib
> to exchange MQTT messages between message publishers and durable
> subscribers. Some of our durable subscribers (running on Android app) may go
> offline for extended periods (say when mobile data connection is disabled
> for the app) and this results in messages getting accumulated for such
> subscribers on the broker.
>
> One way to overcome this problem is to set message expiry so that AMQ can
> delete all expired messages. But MQTT specification does not support message
> expiry and hence I cannot set "TTL" for individual messages. Is there any
> hook from AMQ side to achieve the same effect (either at destination level
> or broker level)?
>
> I saw a configuration offlineDurableSubscriberTimeout that can help to
> achieve similar result. My question is :
> a) Will offlineDurableSubscriberTimeout cleanup offline subscribers even if
> there are unconsumed messages?
> b) Is there any better mechanism to achieve the desired result?
>
> Appreciate any help.
>
> Thanks,
> Shobhana
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Support-for-setting-default-message-expiry-for-MQTT-messages-tp4710015.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
One option might be the TimeStampPlugin which allows for setting a TTL 
that is applied to any message that doesn't already have one. 
http://activemq.apache.org/timestampplugin.html

-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message