Skip to content

test of Spring Boot Autoconfiguration for multiple RabbitMQ ConnectionFactory

Notifications You must be signed in to change notification settings

buwi/spring-boot-rabbitmq-autoconfiguration-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Spring Boot Autoconfiguration project


This sample project highlights a bug with RabbitAutoConfiguration calss in spring-boot-autoconfigure 1.4.0.RELEASE that results in NoSuchBeanDefinitionException when multiple ConnectionFactory beans are defined. (spring-projects/spring-boot#6559)

This project dynamically autoconfigures RabbitMQ beans (ConnectionFactory, RabbitTemplate, RabbitAdmin) based on the presence of properties.

The property csg.rabbitmq.<binding-name> triggers a BeanDefinitionRegistryPostProcessor RabbitMQBeanDefinitionRegistryPostProcessor to register RabbitMQ beans with names prefixed with the binding name. The beans for a binding named "primary" will be registered as @Primary Spring beans.

csg:
  rabbitmq:
    primary:
      host: localhost
      port: 5640
      username: guest
      password: guest
    another:
      host: localhost
      port: 5640
      username: guest
      password: guest

About

test of Spring Boot Autoconfiguration for multiple RabbitMQ ConnectionFactory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages