Skip to content

Commit cc90275

Browse files
add a TTL option to Kombu queues when RabbitMQ is used
1 parent da2d141 commit cc90275

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

socketio/kombu_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def __init__(self, url='amqp://guest:guest@localhost:5672//',
5050

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

5657
def _publish(self, data):

0 commit comments

Comments
 (0)