Mastering RabbitMQ
eBook - ePub

Mastering RabbitMQ

Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum

Share book
  1. 286 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering RabbitMQ

Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum

Book details
Book preview
Table of contents
Citations

About This Book

Master the art of developing message-based applications with RabbitMQ

About This Book

  • Learn how to administer, manage, and extend your own message broker, RabbitMQ
  • Develop clients to make a message bridge between your software systems using RabbitMQ
  • Discover how to achieve proficiency with RabbitMQ with the well-defined descriptions of the topics

Who This Book Is For

If you are an intermediate-level RabbitMQ developer, who wants to achieve professional-level expertise in the subject, this book is for you. You'll also need to have a decent understanding of message queuing.

What You Will Learn

  • Administer RabbitMQ using different tools
  • Understand the roots and details of messaging, message brokers, and AMQP protocol
  • Scale the RabbitMQ server using the clusters and high availability techniques
  • Extend RabbitMQ by developing the Erlang OTP-based applications that use the RabbitMQ API
  • Manage the RabbitMQ server using its powerful tools
  • Monitor the RabbitMQ Server using different open source tools such as Nagios, Munin, and Zabbix
  • Ensure your RabbitMQ's security using SSL, SASL, and access control
  • Develop RabbitMQ clients using Java, Python, and C# with an industry example

In Detail

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#.

Style and approach

An easy-to-follow guide, full of hands-on examples based around managing, monitoring, extending, and securing RabbitMQ and its internal tools. You will learn how to develop your own clients using Java, Python, and C#.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Mastering RabbitMQ an online PDF/ePUB?
Yes, you can access Mastering RabbitMQ by Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum in PDF and/or ePUB format, as well as other popular books in Informatica & Programmazione in Java. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781783981526

Mastering RabbitMQ


Table of Contents

Mastering RabbitMQ
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started
Message brokers and message queue
Message brokers
Message Queues
An introduction to the advanced message queue protocol
An overview of RabbitMQ
Installation of RabbitMQ
Windows
Mac OS X
Ubuntu
Fedora
Amazon elastic compute cloud (EC2)
Starting RabbitMQ
Starting RabbitMQ on Windows
Other OSes (Linux, Mac OS X)
Summary
2. Configuring RabbitMQ
Overall configuration of RabbitMQ
The RabbitMQ environment variables
Common environment variables
Unix-specific default location
Windows-specific default location
The configuration file
Runtime parameters
Parameter management
Policy management
Memory management
Summary
3. Architecture and Messaging
Messaging and its use cases
Coupling of the software systems
Heterogeneous integration
Addressing scalability
Enterprise messaging
Messaging-related software architectures
Message oriented middleware – Architecture
Event-driven architecture
Messaging concepts
Message producers
Message brokers
Message consumers
Messages
Advanced Message Queuing Protocol (AMQP)
AMQ elements
Message flow
Exchanges in AMQ
Message queues
Bindings
Functional specifications of AMQP
AMQP messages
Virtual hosts
Exchange types
The direct exchange type – amq.direct
The fan-out exchange type – amq.fanout
The topic exchange type – amq.topic
The headers exchange type – amq.match
Summary
4. Clustering and High Availability
High reliability in RabbitMQ
Federation in RabbitMQ
Clustering in RabbitMQ
Creating clusters
Checking the cluster status
Changing the cluster node types
Updating cluster nodes
Clustering the settings of RabbitMQ
Load balancing for high availability of queues
Summary
5. Plugins and Plugin Development
Plugin management and default plugins
Enabling and disabling plugins
Installing plugin from third-party sources
Default plugin list
Plugin configuration
Custom plugin development
Basics of Erlang
Variables and expressions
Tuples and lists
Functions and modules
Conditionals
Looping in Erlang
Concurrent programming
Simple RabbitMQ metronome plugin
Summary
6. Managing Your RabbitMQ Server
Management via a command line
Cluster commands
User commands
Virtual host and permission commands
Miscellaneous commands
Management via a web plugin
Management via a REST API
Summary
7. Monitoring
RabbitMQ command-line tools
Web plugins
Nagios
Munin
Zabbix
Summary
8. Security in RabbitMQ
An brief introduction to security in RabbitMQ
Vulnerabilities
Information leakage
Session management
Authentication and authorization
Solutions to the vulnerabilities
Fixing information leakage
Session management
Authentication and authorization
Applying access control
Providing SASL authentication
SSL support in RabbitMQ
Keys, certificates, and CA certificates
Enabling SSL support
Summary
9. Java RabbitMQ Client Programming
Case study
Use cases
Interaction diagram – sequence diagram
Application language – Java
Java Message Service (JMS)
RabbitMQ Java client API
Client package in detail
Connection
Channel
Exchanges
Queues
Publishing messages
Consuming messages
Synchronously receiving messages
Asynchronously receiving messages
Case study – client implementations
Model classes
JSONMessage interface
Message model
File message
Task
Single message
Sender
Receiver
Group message – routing
Sender
Receiver
Bulk message – PubSub
Sender
Receiver
File message
Sender
Receiver
RPC message
RPC client
RPC server
Creating tasks – manual acknowledgment
Task creator
Task handler
Creating distributing tasks
Task creator
Task handler clients
Spring framework and RabbitMQ
Spring AMQP
Single message
Spring config
Sender
Receiver
PubSub messages
Spring config
Private messages – routing
Spring config
Summary
10. Ruby Client Programming
Case study
Small data
Big data
Medium data
Solving all data problems
Bunny and Ruby
Installing Ruby
Linux
Windows
OSX/Mac
Rbenv
Installing Bunny
Using Bunny
Bunny producer
Bunny consumer
Exploring the AMQP model with Bunny
Workers
Publish – subscribe
Routing
The real-time processing
Sneakers
Installing
Lambda architecture
The real-time processors
Key performance indicators (KPIs)
Building averaging workers
Windows
Linux
Mac OS X
Building the IP2Location worker
Exploring sneakers
Timeouts
Job handling
Metrics
Summary
11. Python Client Programming
Case study
Getting Python dependencies
Pika
Installing Pika
Our first Pika client
A consumer
Introducing the web scraper
Scheduler
Scraper
Implementing the scheduler
Implementing the scraper
Running the scraper
Handling failure
Using acknowledgement
The Pika API
Connecting
Using connection adapters
BlockingConnection
BlockingChannel
Declaring queues and exchanges
Authentication
Plain credentials
SSL and external credentials
Certificate authentication
Background processing
Celery
Installation
Celery scraper
Celery scheduler
Exploring Celery
Scheduling
HTTP hook tasks
Other Celery features
Summary
Index

Mastering RabbitMQ

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of...

Table of contents