cdmbase / rabbitmq-pubsub

Typescript based RabbitMq Producer and Consumer Library
MIT License
15 stars 18 forks source link

Allow queues not to be persisted when unsubscribed #2

Open xaviertholot opened 6 years ago

xaviertholot commented 6 years ago

Hello,

I am using https://github.com/cdmbase/graphql-rabbitmq-subscriptions which uses this pubsub, and I noticed that when a client disconnects, the pubsub unsubscribes successfully, but only cleans the consumers, not the queues.

capture d ecran 2018-08-30 a 11 29 30

As seen on the picture above, RabbitMQ queues continue to stack, and it becomes problematic when we have thousands of users. Is there a way to change this behavior ?

I was thinking about passing a autoDelete: true to the queues when created... But your opinion is very welcomed 😃

Stradivario commented 3 years ago

Oh my god i am struggling from this problem for few years.

I am trying to find out how to remove all queues since in couple of hours usage rabbitmq consumes too much memory.

In the meantime any idea how to get rid of the queues did you figure out ?

I will research more further about this scenario.

@xaviertholot

EDIT: I found your PR thanks for the support!