RabbitMQ Essentials - Second Edition

Book description

Learn basic to advanced RabbitMQ techniques with the help of a realistic case study shared by the experts from CloudAMQP

Key Features

  • Delve into message queues with this comprehensive RabbitMQ guide
  • Explore message queue architecture evolution with the help of a realistic case study
  • Discover strategies for improving scalability and fault tolerance of a message queue architecture

Book Description

RabbitMQ is an open source message queuing software that acts as a message broker using the Advanced Message Queuing Protocol (AMQP). This book will help you to get to grips with RabbitMQ to build your own applications with a message queue architecture. You'll learn from the experts from CloudAMQP as they share what they've learned while managing the largest fleet of RabbitMQ clusters in the world.

Following the case study of Complete Car, you'll discover how you can use RabbitMQ to provide exceptional customer service and user experience, and see how a message queue architecture makes it easy to upgrade the app and add features as the company grows. From implementing simple synchronous operations through to advanced message routing and tracking, you'll explore how RabbitMQ streamlines scalable operations for fast distribution. This book will help you understand the advantages of message queue architecture, including application scalability, resource efficiency, and user reliability. Finally, you'll learn best practices for working with RabbitMQ and be able to use this book as a reference guide for your future app development projects.

By the end of this book, you'll have learned how to use message queuing software to streamline the development of your distributed and scalable applications.

What you will learn

  • Get well versed with RabbitMQ's message queue architecture and features
  • Discover the benefits of RabbitMQ, AMQP, and message queuing
  • Install and configure RabbitMQ and its plugins
  • Get to grips with the management console features and controls
  • Understand how queue and exchange types differ and when and how to use them
  • Get the hang of channels, routing strategies, and direct exchanges
  • Implement best practices to work smoothly with message queues

Who this book is for

If you are a professional enterprise developer or someone who just codes for fun, RabbitMQ Essentials is a valuable resource on open-source message queue architecture. Even those already familiar with microservices and messaging will discover value in reading this book for an exploration of moving forward with best practices and resource efficiency. This book will give you the push you need to get started with creating new and exciting applications or migrating existing monoliths to a microservice architecture.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. RabbitMQ Essentials Second Edition
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the authors
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Reviews
  6. A Rabbit Springs to Life
    1. Technical requirements
    2. Explaining message queues
    3. Discovering AMQP and RabbitMQ
    4. The request-response message exchange pattern
    5. Message queuing exchange pattern
    6. A loosely coupled architecture
    7. Meet AMQP
    8. The RabbitMQ broker
    9. Using RabbitMQ in real life
    10. Message queues between microservices
    11. Event and tasks
    12. Exploring the benefits of message queuing
    13. A RabbitMQ scenario
    14. Getting ready for RabbitMQ
    15. Installing the broker
    16. RabbitMQ installation on Ubuntu
    17. RabbitMQ installation on Docker
    18. Starting RabbitMQ
    19. Downloading the example code
    20. Verifying that the RabbitMQ broker is running
    21. Installing the management plugin (Web UI)
    22. Configuring users
    23. Configuring dedicated vhosts
    24. Summary
  7. Creating a Taxi Application
    1. Technical requirements
    2. The application architecture behind CC
    3. Establishing a solid connection to RabbitMQ
    4. Working with channels
    5. Building the taxi request tool
    6. The direct exchange
    7. Sending the first messages
    8. AMQP message structure
    9. Consuming messages
    10. Acknowledgment and negative acknowledgment
    11. Running the code
    12. Running the application
    13. Adding topic messages
    14. Summary
  8. Sending Messages to Multiple Taxi Drivers
    1. Technical requirements
    2. Working with channels and queues
    3. Specifying a consumer prefetch count
    4. Setting the correct prefetch value
    5. Acknowledging messages
    6. Publishing to all queues
    7. Fanout exchange
    8. Binding to the fanout
    9. Running the application
    10. Summary
  9. Tweaking Message Delivery
    1. Technical requirements
    2. Handling dead letters
    3. Refactoring queues
    4. Undertaking messages
    5. Delayed messages with RabbitMQ
    6. Making delivery mandatory
    7. Default exchanges in RabbitMQ
    8. Implementing the back office sender
    9. Summary
  10. Message Routing
    1. Technical requirements
    2. Sending responses to the publisher
    3. WebSockets in RabbitMQ
    4. Enabling the Web STOMP plugin
    5. Securing Web STOMP with SSL 
    6. Creating and publishing GPS data to the queue
    7. Subscribing to GPS and driver information via WebSockets
    8. Reply-to queues and RPC
    9. Creating a data analysis service
    10. Summary
  11. Taking RabbitMQ to Production
    1. Technical requirements
    2. Adding nodes to the cluster
    3. Connecting to the cluster
    4. Partition handling strategies
    5. Discovering the types of RabbitMQ queues
    6. Mirroring queues
    7. Quorum queues
    8. Lazy queues
    9. Using federated brokers and log aggregation
    10. Handling log processing 
    11. Summary
  12. Best Practices and Broker Monitoring
    1. How to avoid losing messages
    2. Using a dead letter exchange
    3. Handling acknowledgments and confirms
    4. Best practices of message handling
    5. Limiting message size
    6. Using consumers and prefetching
    7. Keeping queues and brokers clean
    8. Setting the TTL for messages or the max-length on queues
    9. Auto-deleting unused queues
    10. Routing best practices
    11. Designing a system with routing in mind
    12. Networking over connections and channels
    13. Using TLS and AMQPS for security
    14. Separate connections
    15. Splitting queues over different cores
    16. RabbitMQ sharding
    17. Consistent Hash Exchange
    18. Exploring key takeaways
    19. Monitoring – querying the REST API
    20. Summary
  13. Other Book You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: RabbitMQ Essentials - Second Edition
  • Author(s): Lovisa Johansson, David Dossot
  • Release date: August 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781789131666