Connection Properties
Connect to platform queues using a RabbitMQ client on the BitBrew endpoint.
Setting Up Queue Credentials
First, go to Queue Credentials navigation tab.
Then, click the Add Credential button located at the upper right corner of the screen, name your credential, and finally Create Credential.
AMQP Connection String
amqps://$username:$password@$host:$port/$vhost?heartbeat=30
Note: The username and password above are generated using the Queue Credentials tab on the Dashboard. They are not your Dashboard login and password.
Example String
amqps://58d2k4b0@bitbrew.com:hLuhL6pIeZo6hd84gt7dgaag@rabbitmq-production.kubernetes.bitbrew.com:5671/tenantbitbrew?heartbeat=30
You can find your tenant ID in the Account tab under your login located at the top right corner.
TLS
Make sure to enable TLS in the configuration of your RabbitMQ client when using port 5671.
BitBrew does not use self-signed certificates. Our certificates are signed by an intermediary named Let’s Encrypt Authority X3, and a root authority named Digital Signature Trust Co (DST Root CA X3).
The DST Root CA X3 root certificate was added to Java’s trust store in versions 7u111+ and 8u101+ of the JVM (on 2016-07-19).
Having Trouble?
If you're having trouble validating our TLS certificates, try updating your JVM version, and make sure you have the DST Root CA X3 root certificate in your Java trust store.
Also, make sure to enable SSL in your RabbitMQ client. Refer to your client documentation for specific instructions.
Sample Code for Configuring SSL in the Java Driver
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("rabbitmq-production.kubernetes.bitbrew.com");
factory.setPort(5671);
factory.useSslProtocol("TLSv1.2");
Heartbeat
The platform will terminate connections that are idle longer than 60 seconds. Use the heartbeat
parameter for AMQP to keep the client connection open during idling periods.
The recommended heartbeat setting is 30 seconds.
Sample Consumer
We've posted a simple queue consumer written in node.js on Github for you to use for testing. It's not fit for production use, but it'll get you started. 😄
We've also written a tutorial demonstrating a queue consumer in python to show you the inner workings.