Connect to SSL enabled RabbitMQ server Springboot
Posted By : Kundan Ray Akela | 10-Jan-2017

In this blog I am going to share the information about how to configure and implement RabbitMQ in springboot application. So first of all some basic information about what RabbitMQ does.
RabbitMQ is basically use to implement queueing based messages between applications.It is opensource,robust,easy to use and runs on all major operating systems.It implements AMQP.
Let's start the configuration.First of all define the dependency in pom.xml.
org.springframework.boot spring-boot-starter-amqp
Next step should be to define properties of RabbitMQ server to connect it in application.properties file.
#Rabbitmq configuration
spring.rabbitmq.host=hostURL
spring.rabbitmq.port = hostPort
spring.rabbitmq.username = username
spring.rabbitmq.password = password
spring.rabbitmq.virtual-host=virtualHost
spring.rabbitmq.ssl.enabled=true
spring.rabbitmq.ssl.algorithm=TLSv1.2
spring.rabbitmq.ssl.key-store=/rabbitmq-security/dev/inno-certs-p12/keycert.p12
spring.rabbitmq.ssl.key-store-password=tihm2k16
spring.rabbitmq.ssl.trust-store=/rabbitmq-security/dev/rabbitstore
spring.rabbitmq.ssl.trust-store-password=truststorepass
Let's go through main property parameters.
#spring.rabbitmq.ssl.algorithm - You should be make sure to use the same version of TLS at client side which server is using. Version incompatible will cause issues. #spring.rabbitmq.ssl.key-store - This will be the path of you private and public key certificate.
#spring.rabbitmq.ssl.key-store-password - This will be password which is used to generate the key certificate.
#spring.rabbitmq.ssl.trust-store - Path where your truststore resides.
#spring.rabbitmq.ssl.trust-store-password - Password which is used to generate the truststore.
You can test publishing and receiving messages.
Follow the previous blog to get code.RabbitMQ-Client-implementation-in-springboot.
Thanks
Kundan Ray
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Kundan Ray Akela
Kundan holds years of industry experience as a Fullstack Developer in various technologies and is focused in defining the architecture of the system to ensure reliability and resilience. He possess good knowledge & understanding of latest technologies and hands-on experience in Core Java, Spring-Boot, hibernate, React, Angular , Apache Kafka messaging queue , AI Development like Computer Vision/Generative AI/Prediction System, Internet of Things based technologies and relational database like MySql, PostgreSQL etc. He is proficient in API Implementations, Webservices, Development Testings and deployments, code enhancements and have been contributing to company values through his deliverable in various client projects namely VirginMedia, Konfer, TIHM, Herdsy, HP1T and many more. He has a creative mind and has good analytical skills and likes reading and exploring new technologies.