Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Microservices

You're reading from   Spring Microservices Internet-scale architecture with Spring framework, Spring Cloud, Spring Boot

Arrow left icon
Product type Paperback
Published in Jun 2016
Publisher Packt
ISBN-13 9781786466686
Length 436 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rajesh R V Rajesh R V
Author Profile Icon Rajesh R V
Rajesh R V
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Demystifying Microservices FREE CHAPTER 2. Building Microservices with Spring Boot 3. Applying Microservices Concepts 4. Microservices Evolution – A Case Study 5. Scaling Microservices with Spring Cloud 6. Autoscaling Microservices 7. Logging and Monitoring Microservices 8. Containerizing Microservices with Docker 9. Managing Dockerized Microservices with Mesos and Marathon 10. The Microservices Development Life Cycle Index

Implementing Spring Boot messaging


In an ideal case, all microservice interactions are expected to happen asynchronously using publish-subscribe semantics. Spring Boot provides a hassle-free mechanism to configure messaging solutions:

In this example, we will create a Spring Boot application with a sender and receiver, both connected though an external queue. Perform the following steps:

Note

The full source code of this example is available as the chapter2.bootmessaging project in the code files of this book.

  1. Create a new project using STS to demonstrate this capability. In this example, instead of selecting Web, select AMQP under I/O:

  2. Rabbit MQ will also be needed for this example. Download and install the latest version of Rabbit MQ from https://www.rabbitmq.com/download.html.

    Rabbit MQ 3.5.6 is used in this book.

  3. Follow the installation steps documented on the site. Once ready, start the RabbitMQ server via the following command:

    $./rabbitmq-server
    
  4. Make the configuration changes to the application...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image