Photo by Zichao Zhang / Unsplash

Spring Boot with RabbitMQ (Producer)

Spring Boot Aug 7, 2022

This post briefly documents the usage of RabbitMQ with Spring Boot.

Introduction

RabbitMQ is an open source message broker.

Minimum Software Requirements

  • RabbitMQ
  • Java

Sample Project

spring-boot-rabbit-mq-producer is the sample Spring Boot web application i've used to illustrate the usage of the aforementioned tool.

Navigate to http://localhost:8080/swagger-ui/index.html#/ to discover the application URLs.

Noticed an issue with this Sample Project? Open an issue or a PR on GitHub!

Basic Usage

RabbitMQ
docker run -p 15672:15672 -p 5672:5672 --hostname my-rabbit --name rabbit-mq rabbitmq:3.7.1-management
  • Username: guest
  • Password: guest

Screenshot-from-2022-08-07-09-41-13

Application Execution

API url's can be accessed at http://localhost:8080/swagger-ui/index.html#/

swagger

Sample JSON body

{
	"name": "Jane",
	"username": "janejane",
	"address": {
		"street": "Jane Plains",
		"suite": "Suite 779",
		"city": "Wisokyburghh",
		"zipcode": "90565-7771",
		"geo": {
			"lat": "-43.9589",
			"lng": "-34.4628"
		}
	}
}

exchanges

queues

graph

Tags

Anantha Raju C

| Poetry | Music | Cinema | Books | Visual Art | Software Engineering |