This topic describes how to use port 5671 on a client that is developed by using Spring Boot to send and receive messages.

Sample code

Create a Message Queue for RabbitMQ configuration file that is named application.properties and configure relevant parameters based on the comments in the code.

spring.rabbitmq.host= # Specify the endpoint of your Message Queue for RabbitMQ instance. You can obtain the endpoint on the instance details page in the Message Queue for RabbitMQ console. 
spring.rabbitmq.port=5671 # The port that is used to establish encrypted connections to Message Queue for RabbitMQ. 
spring.rabbitmq.username= # The username of the account that is used to connect to your Message Queue for RabbitMQ instance. You can view the username on the account management page in the Message Queue for RabbitMQ console. 
spring.rabbitmq.password= # The password of the account that is used to connect to your Message Queue for RabbitMQ instance. You can view the password on the account management page in the Message Queue for RabbitMQ console. 
spring.rabbitmq.dynamic=false # Disable an AmqpAdmin bean from being created. 
spring.rabbitmq.listener.simple.acknowledge-mode= # Specify an acknowledgment mode. 

# SSL-related configurations
spring.rabbitmq.ssl.enabled=true # Enable SSL. 
spring.rabbitmq.ssl.algorithm=TLSv1.2 # Specify the algorithm that is used in SSL. 

spring.rabbitmq.ssl.validate-server-certificate=false # Enable certificate verification on servers. 
spring.rabbitmq.ssl.verify-hostname=false # Disable hostname verification.