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

Persistence parameters have been set, but not in effect #476

Open
c-y-q opened this issue May 21, 2019 · 0 comments
Open

Persistence parameters have been set, but not in effect #476

c-y-q opened this issue May 21, 2019 · 0 comments

Comments

@c-y-q
Copy link

c-y-q commented May 21, 2019

var amqp = require('amqp')
var connection = amqp.createConnection({
host:'127.0.0.1',
post:5672,
login:'test',
password: '123',
vhost: '/test'
})
connection.on('error',function(err){
console.log('connection err : '+err);
})
var queName = 'test_q3',exname='test_ex';
connection.on('ready',function(){
var ex = connection.exchange(${exname},{type:'fanout',durable:true,autoDelete:false});
connection.queue(${queName},{durable:true,autoDelete:false},function(q){

 q.bind(ex,queName,function(){
 	ex.publish(queName,'test msg1',{deliveryMode:2})
 	ex.publish(queName,'test msg2 msg2',{deliveryMode:2})
 })
 setTimeout(function() {
    console.log("Single queue bind callback succeeded");
 //exchange.destroy();
 //queue.destroy();node
     connection.end();
     connection.destroy();
     },1000); 
q.subscribe({ack:true,prefetchCount:1},function(msg){
	q.shift()
	console.log('receive msg : '+msg.data);
})
})

})

fdfdfdfd

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