Skip to content

Commit

Permalink
add a TTL option to Kombu queues when RabbitMQ is used
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Sep 18, 2016
1 parent da2d141 commit cc90275
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion socketio/kombu_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def __init__(self, url='amqp://guest:guest@localhost:5672//',

def _queue(self, conn=None):
exchange = kombu.Exchange(self.channel, type='fanout', durable=False)
queue = kombu.Queue(str(uuid.uuid4()), exchange)
queue = kombu.Queue(str(uuid.uuid4()), exchange,
queue_arguments={'x-expires': 300000})
return queue

def _publish(self, data):
Expand Down

0 comments on commit cc90275

Please sign in to comment.