Question

i am not able to create auto delete queue through sockjs it create durable queue but not delete the queue after a few minute if it is not used. this feature available in rabbitmq but not supported in sockjs.

Please suggest me how to create auto delete queue through sockjs

Was it helpful?

Solution

I've managed to do this by creating an 'auto-delete' policy for queue names matching a given pattern.

I'm using Java/Spring/RabbitMQ in the backend and SockJS/Stomp in the client. All queues rabbitmq creates follow the same naming convention : suggestions-user* so once you declare the policy in Rabbit all queues will be deleted after the expiry parameter Check it out

Enable Visualiser plugin if you want to define the policy through UI otherwise you can also do it via rabbitmqctl command in a terminal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top