Build a high-availability cluster rabbitmq and spring boot cluster configuration achieved

java spring boot configuration:

// See the specific source configuration 
org.springframework.boot.autoconfigure.amqp.RabbitProperties 


// RabbitMQ single 
Spring: 
  RabbitMQ: 
    Host: localhost 
    Port: 5672 
    username: your_username 
    password: your_password 

@ RabbitMQ or single use only Addresses 
Spring: 
  RabbitMQ: 
    Addresses: IP1: port1 
    username: your_username 
    password: your_password 


// RabbitMQ cluster, addresses must be separated by commas 
the Spring: 
  RabbitMQ: 
    Addresses: IP1: port1, ip2: port2, IP3: Port3 
    username: your_username 
    password: your_password

 

See also:

https://github.com/spring-projects/spring-boot/blob/v2.1.5.RELEASE/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

 

Guess you like

Origin www.cnblogs.com/zhjh256/p/10937406.html