Whenever the RabbitMQ broker is exposed to the Internet, it is highly advisable to protect the connections by using the SSL library.
RabbitMQ does not implement SSL by itself, but it uses the certificate mechanism of the given language, Erlang for the server and Java, .NET, or whatever for the clients.
Here, we will see how to have a basic protection with SSL, that is, how to encrypt the connections from the RabbitMQ clients to the broker.
This is enough to avoid simple security attacks. With no SSL, usernames and passwords are sent just in clear through the network.
The current example has the following prerequisites:
A Linux OS hosting the RabbitMQ broker
openssl Linux package
The latest Erlang distribution—at least R14B
Java JDK on the client, either on Linux or Windows
We have chosen to limit this recipe to just Linux on the server side because on Windows, there are too many version combinations—some with limited or no functionality at all. It is a good idea to run your...