You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sophia Wright <so...@gmail.com> on 2013/10/16 14:55:07 UTC

Message Expiration thorugh broker

Hi,

Is it possible to set message expiration time for broker. Producer can
specify time to live for a message and after that time it will expire. But
if a producer does not specify expiration time, then all unconsumed messages
will always be there in kahadb.  Is there a way by which broker can expire
those messages after some time ?

Thanks,
Sophia 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Message Expiration thorugh broker

Posted by Robert Davies <ra...@gmail.com>.
The broker camel component should make it easier to do - see http://activemq.apache.org/broker-camel-component.html

On 7 Nov 2013, at 14:59, Sophia Wright <so...@gmail.com> wrote:

> Thank you Gary :) 
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4674010.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Rob Davies
-----------------
Red Hat, Inc
Twitter: rajdavies
Blog: http://rajdavies.blogspot.com
ActiveMQ in Action: http://www.manning.com/snyder/


Re: Message Expiration thorugh broker

Posted by Sophia Wright <so...@gmail.com>.
Thank you Gary :) 




--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4674010.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Message Expiration thorugh broker

Posted by Gary Tully <ga...@gmail.com>.
that should be fine. for the most part the TimeStampPlugin is used
when client clocks are out of sync with the broker.

Feel free to patch the TimeStampPlugin so just add a missing
expiration as an option and submit a diff.
Seems like an sensible enhancement and all contributions are welcome.

On 6 November 2013 11:01, Sophia Wright <so...@gmail.com> wrote:
> Sorry for the late reply...
>
> Actually I don't want to use TimeStampPlugin because it also set JMS
> Client's timestamp on the message with a broker timestamp according to the
> broker's clock. I don't want to disturb the time stamp which is set by the
> producers.
>
> So I thought that I can write my own plugin which only expires messages by
> setting expiration time for each message using
> "message.setExpiration(expiration);" if expiration time is not provided by
> the producer.
>
> So is this a right way to do this ? Are there any consequences of
> this(something related to time stamp)
>
> Thanks,
> Sophia
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4673940.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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

Re: Message Expiration thorugh broker

Posted by Sophia Wright <so...@gmail.com>.
Sorry for the late reply...

Actually I don't want to use TimeStampPlugin because it also set JMS
Client's timestamp on the message with a broker timestamp according to the
broker's clock. I don't want to disturb the time stamp which is set by the
producers.

So I thought that I can write my own plugin which only expires messages by
setting expiration time for each message using 
"message.setExpiration(expiration);" if expiration time is not provided by
the producer.

So is this a right way to do this ? Are there any consequences of
this(something related to time stamp)

Thanks,
Sophia
 





--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4673940.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Message Expiration thorugh broker

Posted by Robert Davies <ra...@gmail.com>.
Inactive destinations will only be deleted if there aren't any messages awaiting delivery - so could only be used in conjunction with messages getting expired.
What problems are you seeing with the TimeStamp plugin ?


On 21 Oct 2013, at 15:57, Sophia Wright <so...@gmail.com> wrote:

> Thanks for the reply,
> 
> Time Stamp plugin can be used but it is creating some other problem for my
> broker, So is there another way to delete such messages. Can I use
> http://activemq.apache.org/delete-inactive-destinations.html ?
> 
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4673048.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Rob Davies
-----------------
Red Hat, Inc
Twitter: rajdavies
Blog: http://rajdavies.blogspot.com
ActiveMQ in Action: http://www.manning.com/snyder/


Re: Message Expiration thorugh broker

Posted by Sophia Wright <so...@gmail.com>.
Thanks for the reply,

Time Stamp plugin can be used but it is creating some other problem for my
broker, So is there another way to delete such messages. Can I use
http://activemq.apache.org/delete-inactive-destinations.html ?





--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873p4673048.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Message Expiration thorugh broker

Posted by Christian Posta <ch...@gmail.com>.
Check here:

http://activemq.apache.org/timestampplugin.html


On Wed, Oct 16, 2013 at 5:55 AM, Sophia Wright <so...@gmail.com>wrote:

> Hi,
>
> Is it possible to set message expiration time for broker. Producer can
> specify time to live for a message and after that time it will expire. But
> if a producer does not specify expiration time, then all unconsumed
> messages
> will always be there in kahadb.  Is there a way by which broker can expire
> those messages after some time ?
>
> Thanks,
> Sophia
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Message-Expiration-thorugh-broker-tp4672873.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta