# Nameko event max ttl?

**URL:** <https://discourse.nameko.io/t/nameko-event-max-ttl/215>\
**Category:** googlegroup\
**Created:** [October 27, 2017, 3:48pm UTC](https://discourse.nameko.io/t/nameko-event-max-ttl/215 "2017-10-27T15:48:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Richard](https://discourse.nameko.io/u/Richard)\
**Post date:** [October 27, 2017, 3:48pm UTC](https://discourse.nameko.io/t/nameko-event-max-ttl/215/1 "2017-10-27T15:48:40Z")

</div>

Hi,

Is there a way to make an nameko event get deleted from rabbitmq if it has  
been waiting to be processed for x seconds?

thanks

---

<div class="post-metadata">

**Author:** ![simon\_harrison](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@simon\_harrison](https://discourse.nameko.io/u/simon_harrison)\
**Post date:** [October 28, 2017, 1:09pm UTC](https://discourse.nameko.io/t/nameko-event-max-ttl/215/2 "2017-10-28T13:09:43Z")

</div>

alternatively, how can we help nameko  
support [Time-To-Live and Expiration — RabbitMQ](https://www.rabbitmq.com/ttl.html)

> **···**
>
> On Friday, 27 October 2017 16:48:41 UTC+1, Richard wrote:
> 
> > Hi,
> > 
> > Is there a way to make an nameko event get deleted from rabbitmq if it has  
> > been waiting to be processed for x seconds?
> > 
> > thanks

---

<div class="post-metadata">

**Author:** ![mattbennett](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.nameko.io/mattbennett/32/13_2.png) [@mattbennett](https://discourse.nameko.io/u/mattbennett)\
**Post date:** [October 28, 2017, 7:12pm UTC](https://discourse.nameko.io/t/nameko-event-max-ttl/215/3 "2017-10-28T19:12:58Z")

</div>

Actually Nameko support for this landed in 2.7.0.

This is all you need to add per-message TTL for events:

class Service:  
&nbsp;&nbsp;&nbsp;name = "service"

&nbsp;&nbsp;&nbsp;dispatch = EventDispatcher(expiration=300) # seconds

&nbsp;&nbsp;&nbsp;...

> **···**
>
> On Saturday, October 28, 2017 at 2:09:44 PM UTC+1, simon harrison wrote:
> 
> > alternatively, how can we help nameko support  
> > [Time-To-Live and Expiration — RabbitMQ](https://www.rabbitmq.com/ttl.html)
> > 
> > On Friday, 27 October 2017 16:48:41 UTC+1, Richard wrote:
> > 
> > > Hi,
> > > 
> > > Is there a way to make an nameko event get deleted from rabbitmq if it  
> > > has been waiting to be processed for x seconds?
> > > 
> > > thanks

---

<div class="post-metadata">

**Author:** ![Richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Richard](https://discourse.nameko.io/u/Richard)\
**Post date:** [October 30, 2017, 9:31am UTC](https://discourse.nameko.io/t/nameko-event-max-ttl/215/4 "2017-10-30T09:31:10Z")

</div>

Perfect, thanks

> **···**
>
> On Saturday, October 28, 2017 at 8:12:58 PM UTC+1, Matt Yule-Bennett wrote:
> 
> > Actually Nameko support for this landed in 2.7.0.
> > 
> > This is all you need to add per-message TTL for events:
> > 
> > class Service:  
> > &nbsp;&nbsp;&nbsp;name = "service"
> > 
> > &nbsp;&nbsp;&nbsp;dispatch = EventDispatcher(expiration=300) # seconds
> > 
> > &nbsp;&nbsp;&nbsp;...
> > 
> > On Saturday, October 28, 2017 at 2:09:44 PM UTC+1, simon harrison wrote:
> > 
> > > alternatively, how can we help nameko support  
> > > [Time-To-Live and Expiration — RabbitMQ](https://www.rabbitmq.com/ttl.html)
> > > 
> > > On Friday, 27 October 2017 16:48:41 UTC+1, Richard wrote:
> > > 
> > > > Hi,
> > > > 
> > > > Is there a way to make an nameko event get deleted from rabbitmq if it  
> > > > has been waiting to be processed for x seconds?
> > > > 
> > > > thanks
