Search code examples
javacoldfusionrabbitmqcloudamqp

ColdFusion/RabbitMQ Fails on factory.newConnection()


I'm attempting to connect my Coldfusion app to CloudAMQP's RabbitMQ service. I've been able to create the java object, but when I attempt to create a newConnection(), it fails miserably. I'm thinking it may have something to do with my config? Here's how I've mapped AMQP's settings (right) to my code (left). I'm basically following Luis Majano's example code on github (lmajano/messaging-polyglot) which he refers to in his video Down the RabbitMQ Hole with ColdFusion

enter image description here

NOTE: I will rotate the password after posting, so these credentials won't work. Seems like the prudent thing to do :)

When I run this code I'm able to create a factory successfully. The writeDump(factory) code outputs the following.

enter image description here

NOTE: the newConnection() method

Now, when I attempt to actually create a connection factory.newConnection() like so...

enter image description here

it fails! Here is the result of the dump within the catch writeDump(err)

enter image description here

Any idea why it would be failing on the factory.newConnection() method call?


Solution

  • Set the vhost:

    factory.setVirtualHost("vhost");

    The vhost is the same as the username for shared cloudamqp instances.