Common errors when setting up queues

If your AMQP client won't connect to an Ably reactor queue to consume from it, try the following:

 

  • Make sure you're using a supported AMQP client, one that implements amqp 0.9.1. Some, e.g. amqpnetlite, don't implement that version of the protocol. You can find a list of suggested clients for various platforms at https://www.ably.io/download/ under "Download Reactor Message Queue client libraries"
  • Make sure TLS is enabled. If initializing the client with a url that starts with amqps:// this should be automatic; otherwise you will probably have to explicitly enable it
  • Make sure the host (e.g. "us-east-1-a-queue.ably.io"), port (5671) and vhost ("shared") are correct
  • Make sure the API key you're using to consume has the capabilities to consume from queues. If you're not sure, go to the 'API Keys' tab, click 'Settings' for your key, and set 'Resource restrictions' to 'None'.
  • Make sure you're not trying to declare the queue. Many queue tutorials have you declare a queue before using it. We don't allow programmatic declaration of queues -- if you want to create a new queue, you need to do that through the 'queues' tab in your Ably app dashboard; through amqp, you can only consume from an existing queue. (Be warned -- some amqp clients, such as phpamqplib or Ruby's Bunny, may try to declare the queue for you automatically when you get a reference to it or consume from it unless you explicitly prevent that. For example, in bunny, to get a queue without declaring it, you need to use channel.queue('appid:queuename', no_declare: true).)