Skip to content

Ibnrahkm/RabbitMQ-Implementation-Spring-Boot-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RabbitMQ-Implementation-Spring-Boot-Java

start redis docker

sudo docker run --name redis -d -p 6379:6379 -e REDIS_PASSWORD=123456 redis sh -c 'exec redis-server --requirepass "$REDIS_PASSWORD"'

start rabbit MQ docker

docker run -d --hostname myrabbit -p 5000:15672 -p 5672:5672 --name rabitmq-springboot -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password rabbitmq:3-management

from project root directory

./gradlew clean build

after successful build run the project

java -jar <jarfile>

Test the APIs from postman

Note

Default queue,exchange and routing key are bounded through beans. To add a queue,exchange and routing key we have to do this manually by coding.In this example i also implemented that.I exposed one api for creating a complete dynamic queue with exchange and routing key bouned to that new queue.

One important thing is that without routing key bounded already we can publish message but it wont be published actually as there is no exchange and queue are bounded to that routing key.

queue,exchange must need to be created and routing key must need to bounded before use.If we call a non exists queue to broadcast a message then it would be failed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages