Closed combsco closed 8 years ago
Wow. Definitely a bug. I haven't used coworkers rpc in my apps. So I will definitely fix this ASAP. If you have a moment, please help by adding a broken test. Although, this seems like a bug with amqplib-rpc
Typed using my thumbs..
On Aug 26, 2016, at 9:44 AM, Chris. notifications@github.com wrote:
I've had this problem with the amqplib-rpc library. I was trying to use amqplib-rpc on my API Gateway and it would just keep creating new exclusive channels. I had to switch to node-bunnymq because it creates one exclusive queue for responses.
So if I run this code 4 times... I get 4 exclusive queues that don't delete themselves until Coworkers process is killed. This is following the [RPC example from the readme]...(https://github.com/tjmehta/coworkers#rpc--request-reply-checkreplyqueue-example)
Client
app.use(function * (next) { if (this.queueName === 'user.create') { const replyMsg = yield this.request('tenant.read', {tenant_id: this.message.content.tenant_id}) // do something with replyMsg } yield next }) Server
app.queue('tenant.read', function * () { // return the good stuff... this.reply(new Buffer(JSON.stringify(result)) this.ack = true }) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Have a fix coming very soon: https://github.com/tjmehta/amqplib-rpc/pull/10
fixed coworkers@v0.7.2
Turns out exclusive queues do not auto-close when their channel is closed.
Awesome thanks for the update!
Np, lmk if you hit any other problems or have any questions
I've had this problem with the amqplib-rpc library. I was trying to use
amqplib-rpc
on my API Gateway and it would just keep creating new exclusive channels. I had to switch to node-bunnymq because it creates one exclusive queue for responses.So if I run this code 4 times... I get 4 exclusive queues that don't delete themselves until Coworkers process is killed. This is following the RPC example from the readme...
Client
Server