arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
277 stars 129 forks source link

No API to make a handle on a unique queue #78

Closed ghost closed 6 years ago

ghost commented 7 years ago

I tried to create an unique queue for my process and make a handler only for this queue as I have many queues in the system. Am I missing something or API just doesn't provide this?

  1. Calling addQueue with 'MyQueueName', {exclusive: true, unique: 'id', subscribe: true}
  2. Calling bindQueue with my exchange, and 'MyQueueName' still binds the queue fine

Now I want to create my handler for this unique queue and handle called with {queue 'MyQueueName'} isn't getting any messsages for that queue. From what I investigated I would need to call it with {queue: 'UNIQUEID-MyQueueName'} but there is no API to get generated, unique queue name or id.

arobson commented 6 years ago

@ghost - I've fixed this so that you can just handle based on the friendly name/alias. I've also updated the docs to reflect it.

You can see the new integration test that shows a handle wired to a unique queue using the friendly alias working here.