Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to existing queue #53

Open
zeeshanjan82 opened this issue Oct 31, 2015 · 0 comments
Open

Connecting to existing queue #53

zeeshanjan82 opened this issue Oct 31, 2015 · 0 comments

Comments

@zeeshanjan82
Copy link

I am using the following code which is mentioned in the ReadMe for subscribing and publishing to the RabbitMQ Queue:

var Stomp = require('stomp-client');
var destination = '/queue/someQueueName';
var client = new Stomp('127.0.0.1', 61613, 'user', 'pass');

client.connect(function(sessionId) {
    client.subscribe(destination, function(body, headers) {
      console.log('This is the body of a message on the subscribed queue:', body);
    });

    client.publish(destination, 'Oh herrow');
});

However each time I start my Node.JS service I see a new queue created with some random name like: stomp-subscription-dmAADeGXr6fWuOgLSo13zA I already have the queue created in RabbitMQ and I would like to connect to the same queue each time instead of creating a new queue always as the queue created is temporary and gets deleted when the NodeJS service stops. Is there any way to connect to a persistent queue.

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

No branches or pull requests

1 participant