ebook img

RabbitMQ Cookbook PDF

288 Pages·2013·5.532 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview RabbitMQ Cookbook

RabbitMQ Cookbook Over 70 practical recipes to help you develop messaging applications using RabbitMQ with the help of plenty of real-life examples Sigismondo Boschi Gabriele Santomaggio BIRMINGHAM - MUMBAI RabbitMQ Cookbook Copyright © 2013 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 brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: December 2013 Production Reference: 1171213 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84951-650-1 www.packtpub.com Cover Image by Sandeep Vaity ([email protected]) Credits Authors Technical Editors Sigismondo Boschi Shubhangi Dhamgaye Gabriele Santomaggio Novina Kewalramani Pratik More Reviewers Suneeth Nair Lucas Hrabovsky Rohit Kumar Singh Jorge Puente Sarrín Ken Taylor Project Coordinator Ignacio Colomina Torregrosa Anugya Khurana Héctor Veiga Proofreader Acquisition Editors Linda Morris Usha Iyer Indexer Llewellyn Rozario Tejal Soni Lead Technical Editor Graphics Chalini Snega Victor Ronak Dhruv Copy Editors Abhinash Sahu Alisha Aranha Production Coordinator Roshni Banerjee Adonia Jones Dipti Kapadia Karuna Narayanan Cover Work Kirti Pai Adonia Jones Shambhavi Pai Alfida Paiva Laxmi Subramanian About the Authors Sigismondo Boschi is a software developer currently involved in projects of messaging and networking distributed applications. Prior to this, he has had more than 10 years' experience working with distributed applications and message-passing paradigms. He first acquired a PhD in Computational Physical Chemistry from the University of Bologna, and then has worked in the Development of Scientific High Performance Computing Projects. To my wife, Maria Luisa, and my children, Gaia and Marco. Gabriele Santomaggio has worked in the IT industry for more than 15 years. He is a developer, and very keen on middleware and distributed applications. Currently, he is working on high-performance Java applications. He is the member of a big IT Italian community (www.indigenidigitali.com/) where he has published some posts about Amazon Web Services and message-oriented middleware (http://blog.indigenidigitali.com/tag/gabriele-santomaggio/). He likes running and listening to jazz music. To my beautiful wife, Dia, and my little ninja turtle, Riccardo, with love. About the Reviewers Jorge Puente Sarrín is a Peruvian software developer, currently working at Red Científica Peruana (RCP) as a software architect designing service-based solutions. He is a passionate developer focused on building distributed systems solutions using asynchronous programming with Python and .NET. Also, he has been contributing towards the translation of documentation projects and online courses into Spanish. He is a proud member of Masters of MongoDB, a group of persons who are promoting MongoDB around the world. Ken Taylor has worked in software development and technology for over 15 years. During the course of his career, he has worked as a systems analyst on multiple software projects in several industries as well as with the state government. He has used RabbitMQ for messaging on multiple projects as a way of scaling and as an integration point. He is a member and speaker of the 757 Ruby users group and the Hampton Roads .NET users group (HRNUG). Ken holds an A.S. in Computer Science from Paul D. Camp Community College and was awarded a U.S. Patent for a Real Estate financial software product. He is currently working at Outsite Networks Inc. in Norfolk, Virginia. He lives in Suffolk, Virginia with his lovely wife Lucia and his two sons, Kaide and Wyatt. I would like to thank my wife for her support while writing this book and my sons for reminding me of the importance of being inquisitive. Thank you Packt Publishing for asking me to participate as a technical reviewer for this excellent resource on RabbitMQ. Ignacio Colomina Torregrosa is a technical engineer in telecommunications and a master in free software. He works as a PHP/Symfony developer and has had experience using RabbitMQ as a tool to optimize and improve the performance of web applications that deal with large amounts of traffic. Héctor Veiga is a software engineer specializing in real-time data integration. Recently, he has focused his work on different cloud technologies (AWS, Heroku, OpenShift, and so on) to develop scalable, resilient, and high-performing applications that are able to handle high-volume, real-time data in diverse protocols and formats. Additionally, he has a strong knowledge of messaging systems, such as RabbitMQ and AMQP. Also, Héctor has a Master's degree in Telecommunication Engineering from the Universidad Politécnica de Madrid and a Master's degree in Information Technology and Management from the Illinois Institute of Technology. Héctor currently works at HERE as part of Global Data Integration team and is actively developing scalable applications to consume data from several different sources. HERE heavily utilizes RabbitMQ to address their messaging requirements. In the past, Héctor has worked at Xaptum Technologies, a company dedicated to M2M technologies. I would like to thank my family and friends for their support. They showed me that giving up was not an option and that you just need to keep pushing. Also, I am greatly thankful for the opportunity I was given to live and work in a foreign country. Finally, I would like to acknowledge Steve Fosdal who has been my friend and RabbitMQ colleague during this journey. www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Table of Contents Preface 1 Chapter 1 : Working with AMQP 5 Introduction 5 Connecting to the broker 7 Producing messages 10 Consuming messages 14 Using body serialization with JSON 17 Using RPC with messaging 20 Broadcasting messages 24 Working with message routing using direct exchanges 28 Working with message routing using topic exchanges 30 Guaranteeing message processing 32 Distributing messages to many consumers 34 Using message properties 36 Messaging with transactions 39 Handling unroutable messages 40 Chapter 2 : Going beyond the AMQP Standard 43 Introduction 43 How to let messages expire 44 How to let messages expire on specific queues 45 How to let queues expire 47 Managing rejected or expired messages 49 Understanding the alternate exchange extension 51 Understanding the validated user-ID extension 53 Notifying the consumers of queue failures 55

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.