Book Image

Mastering RabbitMQ

By : Yusuf Aytas, Emrah Ayanoglu, Dotan Nahum
Book Image

Mastering RabbitMQ

By: Yusuf Aytas, Emrah Ayanoglu, Dotan Nahum

Overview of this book

RabbitMQ is one of the most powerful Open Source message broker software, which is widely used in tech companies such as Mozilla, VMware, Google, AT&T, and so on. RabbitMQ gives you lots of fantastic and easy-to-manage functionalities to control and manage the messaging facility with lots of community support. As scalability is one of our major modern problems, messaging with RabbitMQ is the main part of the solution to this problem This book explains and demonstrates the RabbitMQ server in a detailed way. It provides you with lots of real-world examples and advanced solutions to tackle the scalability issues. You’ll begin your journey with the installation and configuration of the RabbitMQ server, while also being given specific details pertaining to the subject. Next, you’ll study the major problems that our server faces, including scalability and high availability, and try to get the solutions for both of these issues by using the RabbitMQ mechanisms. Following on from this, you’ll get to design and develop your own plugins using the Erlang language and RabbitMQ’s internal API. This knowledge will help you to start with the management and monitoring of the messages, tools, and applications. You’ll also gain an understanding of the security and integrity of the messaging facilities that RabbitMQ provides. In the last few chapters, you will build and keep track of your clients (senders and receivers) using Java, Python, and C#.
Table of Contents (18 chapters)
Mastering RabbitMQ
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Starting RabbitMQ


As we can see, the installation part of RabbitMQ is quite easy and starting RabbitMQ is similar to its installation. Some package managers in Linux, Mac OS X, and Windows installer add configuration parameters to operation system's configuration for automatic startup. In such a case, we don't need to run the RabbitMQ command manually; however, if we install RabbitMQ manually, we need to run the RabbitMQ commands manually.

Starting RabbitMQ on Windows

If we use the Windows installer of RabbitMQ, the installer already makes configurations for starting automatically. Therefore, we don't need to run RabbitMQ manually; however, whenever we'd like to control the status of the server, we just need to run following command on the sbin folder of RabbitMQ:

rabbitmqctl status

Status of RabbitMQ in Windows

You may have installed RabbitMQ manually on your Windows and you might wonder how you can run the RabbitMQ server. You should run the following command to start RabbitMQ (you have to run this command with an administrative user). Moreover, you can install the RabbitMQ server as a Windows service:

rabbitmq-server

Other OSes (Linux, Mac OS X)

There's isn't much difference in running RabbitMQ on Windows and other operating systems. If we have RabbitMQ already installed using package managers, such as apt-get, yum, and so on, we don't need to run the RabbitMQ manually because RabbitMQ has already started automatically. So, we'd like to check the status of the RabbitMQ using the following command:

sudo rabbitmqctl status

Status of RabbitMQ in Unix

After controlling the RabbitMQ status, if we get a message that says that RabbitMQ isn't running, then we should run RabbitMQ using the following command on the sbin folder of RabbitMQ installation folder:

rabbitmq-server

Starting of RabbitMQ in Unix