Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Subscribing to non-durable Queues #13

Open
KoushikDasika opened this issue Jun 8, 2016 · 1 comment
Open

Subscribing to non-durable Queues #13

KoushikDasika opened this issue Jun 8, 2016 · 1 comment
Labels

Comments

@KoushikDasika
Copy link

Hi!
I'm working with RabbitMQ though CloudAMQP. I'm having my frontend connect to the service via your library and SockJS. I have two main queues that I want to be durable. A user on the frontend generates a random token and sends a request on one of those queues with the token. The server listens to those and publishes to a queue which is named by the token. It seems that the subscribe block in the frontend is creating the queue and making it durable. What headers do I set on the subscribe call so that the queue is not durable and auto-deletes? Here's what I attempted:

const ws = new SockJS('https://url.cloudamqp.com/stomp');
const client = webstomp.over(ws);
client.connect(username, password, () => {
  client.subscribe(token, callback, {"durable": false, "auto_delete": true});
}, failurecallback, vhost);
@JSteunou
Copy link
Owner

Depends the type of queue but I'm using mostly '/topic/xxxx' queue which are topics obviously and it's non-durable and auto-delete. Refer to RabbitMQ documentation or http://jmesnil.net/stomp-websocket/doc/ I'm sorry I do not know more about your case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants