Mastering RabbitMQ
eBook - ePub

Mastering RabbitMQ

Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum

Compartir libro
  1. 286 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering RabbitMQ

Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering RabbitMQ un PDF/ePUB en línea?
Sí, puedes acceder a Mastering RabbitMQ de Emrah Ayanoglu, Yusuf Aytas, Dotan Nahum en formato PDF o ePUB, así como a otros libros populares de Informatica y Programmazione in Java. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2016
ISBN
9781783981526
Edición
1
Categoría
Informatica

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

Índice