title: Multiple RabbitMQ Application
body: <p>I am trying to host multiple spring boot applications on a tomcat server.
  However, I catch the following exceptions as i try to start the server up.
  The problem is related to having multiple rabbitmq queues with the same caching factory id. 
  I tried creating a ConnectionFactory bean with a different id in the ...Application.class, but the application failed to build.
  Any help is welcomed. </p>
  
  <pre><code>org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [CachingConnectionFactory] with key 'rabbitConnectionFactory'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory
  at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:628) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
  at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5573) [catalina.jar:7.0.68]
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [catalina.jar:7.0.68]
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) [catalina.jar:7.0.68]
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) [catalina.jar:7.0.68]
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) [catalina.jar:7.0.68]
  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259) [catalina.jar:7.0.68]
  at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998) [catalina.jar:7.0.68]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77]
  at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
  at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
  </code></pre>