title: SpringCloudStream - AggregateApplicationBuilder Expects Broker
body: <p>I am playing with Cloud Stream described in the section 3.1.6 at <a href="http://docs.spring.io/spring-cloud-stream/docs/Brooklyn.BUILD-SNAPSHOT/reference/htmlsingle/" rel="nofollow">AggregateApplicationBuilder</a>. I followed the sections and ran the application to get the below error, which expects a broker configuration:</p>
  
  <pre><code>    org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
      at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:62) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:309) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:547) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:90) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:140) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1374) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1367) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1343) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchange(RabbitAdmin.java:156) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.declareExchange(RabbitMessageChannelBinder.java:491) [spring-cloud-stream-binder-rabbit-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.buildOutboundEndpoint(RabbitMessageChannelBinder.java:355) [spring-cloud-stream-binder-rabbit-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.doBindProducer(RabbitMessageChannelBinder.java:407) [spring-cloud-stream-binder-rabbit-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.doBindProducer(RabbitMessageChannelBinder.java:102) [spring-cloud-stream-binder-rabbit-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binder.AbstractBinder.bindProducer(AbstractBinder.java:184) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binding.ChannelBindingService.bindProducer(ChannelBindingService.java:113) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binding.BindableProxyFactory.bindOutputs(BindableProxyFactory.java:206) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.binding.OutputBindingLifecycle.start(OutputBindingLifecycle.java:57) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:874) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.cloud.stream.aggregate.AggregateApplicationBuilder.&lt;init&gt;(AggregateApplicationBuilder.java:60) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at org.springframework.cloud.stream.aggregate.AggregateApplicationBuilder.&lt;init&gt;(AggregateApplicationBuilder.java:56) [spring-cloud-stream-1.0.3.RELEASE.jar:1.0.3.RELEASE]
      at com.capitalone.digitalmessagingsystem.stream.config.Application.main(Application.java:18) [classes/:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
      at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) [idea_rt.jar:na]
  Caused by: java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_60]
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_60]
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_60]
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_60]
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_60]
      at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_60]
      at com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32) ~[amqp-client-3.6.3.jar:na]
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811) ~[amqp-client-3.6.3.jar:na]
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:725) ~[amqp-client-3.6.3.jar:na]
      at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:296) ~[spring-rabbit-1.6.1.RELEASE.jar:na]
      ... 37 common frames omitted
  </code></pre>
  
  <p>Can you please help me here to understand how to eliminate the broker while passing the information as described in the reference guide?</p>
  
  <p>Thanks
  Karthik</p>