Format: PDF / Kindle (mobi) / ePub
- Learn to administer, configure, and manage RabbitMQ instances
- Discover ways to secure and troubleshoot RabbitMQ instances
- This book is fully up-to-date with all the latest changes to version 3.5
RabbitMQ is Open Source Message Queuing software based on the Advanced Message Queue Protocol Standard written in the Erlang Language. RabbitMQ is an ideal candidate for large-scale projects ranging from e-commerce and finance to Big Data and social networking because of its ease of use and high performance. Managing RabbitMQ in such a dynamic environment can be a challenging task that requires a good understanding not only of how to work properly with the message broker but also of its best practices and pitfalls.
Learning RabbitMQ starts with a concise description of messaging solutions and patterns, then moves on to concrete practical scenarios for publishing and subscribing to the broker along with basic administration. This knowledge is further expanded by exploring how to establish clustering and high availability at the level of the message broker and how to integrate RabbitMQ with a number of technologies such as Spring, and enterprise service bus solutions such as MuleESB and WSO2. We will look at advanced topics such as performance tuning, secure messaging, and the internals of RabbitMQ. Finally we will work through case-studies so that we can see RabbitMQ in action and, if something goes wrong, we'll learn to resolve it in the Troubleshooting section.
What you will learn
- Apply messaging patterns using the message broker
- Administer RabbitMQ using the command line, management Web console, or management REST services
- Create a cluster of scalable, and highly-available, RabbitMQ instances
- Use RabbitMQ with the Spring Framework, MuleESB, WSO2, and Oracle databases
- Deploy RabbitMQ using Puppet, Vagrant, or Docker
- Fine-tune the performance of RabbitMQ
- Monitor RabbitMQ using Nagios, Munin, or Monit
- Secure, troubleshoot, and extend RabbitMQ
About the Author
Martin Toshev is a software developer and Java enthusiast with more than eight years of experience and vast expertise originating from projects in areas such as enterprise Java, social networking, source code analysis, Internet of Things, and investment banking in companies such as Cisco and Deutsche Telekom. He is a graduate of computer science from the University of Sofia. He is also a certified Java professional (SCJP6) and a certified IBM cloud computing solution advisor. His areas of interest include a wide range of Java-related technologies (Servlets, JSP, JAXB, JAXP, JMS, JMX, JAX-RS, JAX-WS, Hibernate, Spring Framework, Liferay Portal, and Eclipse RCP), cloud computing technologies, cloud-based software architectures, enterprise application integration, and relational and NoSQL databases. Martin is one of the leaders of the Bulgarian Java Users group (BGJUG), a regular speaker at Java conferences, and one of the organizers behind the jPrime conference in Bulgaria (http://jprime.io/).
Table of Contents
- Introducing RabbitMQ
- Design Patterns with RabbitMQ
- Administration, Confi guration, and Management
- High Availability
- Performance Tuning and Monitoring
- Contributing to RabbitMQ
To delete the error_logs queue from the chat vhost, you can issue the following: rabbitmqadmin.py -V chat delete queue name=error_logs To list all queues in the default domain, you can issue: rabbitmqadmin.py list queues Administering bindings Now that we have seen how straightforward it is to create exchanges and queues, let’s see how to create bindings. The following creates a binding between the logs fanout exchange we already created and the error_logs queue in the default vhost:
receiver/sender clients in the case of node failures; if a node fails, an exception is thrown that must be handled by the client and reconnection is not attempted Case study: scaling the CSN Over time, the users of the CSN increased rapidly and the workload of the system was increasing even more rapidly on a daily basis. It was estimated that this growth might cause issues with the single RabbitMQ broker instance, which essentially turned out to be a bottleneck.
contributing to a book, see our author guide at www.packtpub.com/authors. Customer support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase. Downloading the example code You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book
download and install directly, a RabbitMQ Debian package for the purpose. To install the broker and enable the management plugin, open a terminal and execute the following command: echo "deb http://www.rabbitmq.com/debian/ testing main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list > /dev/null sudo wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc sudo apt-key add rabbitmq-signing-key-public.asc sudo apt-get update sudo apt-get install rabbitmq-server –y
introduced a case study project CSN that makes use of RabbitMQ as a messaging solution for propagation of events throughout the system and lays the basis for further demonstrations on the various features of RabbitMQ. Exercises Attempt the following questions: 1. What is messaging? 2. What are the typical components of a message broker? 3. What appropriate usage scenarios can you think of for the application of messaging systems? 4. Which message patterns does RabbitMQ support and how? 5.