You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when trying to use the RPC implementation in coworkers:
Error: Channel closed by server: 405 (RESOURCE-LOCKED) with message "RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'amq.gen-_G_bE-7udUZ7m6c9seUx0A' in vhost '/'"
at Channel.C.accept (/home/tom/Programming/AuthServer/node_modules/amqplib/lib/channel.js:406:17)
at Connection.mainAccept [as accept] (/home/tom/Programming/AuthServer/node_modules/amqplib/lib/connection.js:64:33)
at Socket.go (/home/tom/Programming/AuthServer/node_modules/amqplib/lib/connection.js:477:48)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at emitReadable_ (_stream_readable.js:513:10)
at emitReadable (_stream_readable.js:507:7)
at addChunk (_stream_readable.js:274:7)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20)
coworkers up and consuming messages
/home/tom/Programming/AuthServer/node_modules/throw-next-tick/index.js:3
throw err;
This is my server side code:
const coworkers = require('coworkers');
const db = require('./model/database');
const {getBearerToken} = require('./auth/oAuth2');
const app = coworkers();
app.prefetch(100);
app.queue('bearer-token-request', function * (){
this.ack = true
const exists = yield this.checkReplyQueue();
if (!exists){
this.nack
return
}
const content = this.message.content;
console.log(content);
this.reply(new Buffer('this is the reply'))
this.ack = true
});
app.on('error', (err)=>{
console.log(err.stack)
});
db.connect((err)=>{
if(err){
console.log('Unable to connect to the database.');
process.exit(1);
} else {
app.connect((err)=>{
if (err) return console.log(err)
console.log('coworkers up and consuming messages')
});
}
});
and I'm just testing it with the following in a node terminal:
I get the following error when trying to use the RPC implementation in coworkers:
This is my server side code:
and I'm just testing it with the following in a node terminal:
The text was updated successfully, but these errors were encountered: