title: Create Exchange and queues in Qpid broker
body: <p>Hi I am testing spring integration project using an embedded broker Qpid. But the problem is that HOW CAN i make queues and exchanges in qpid. I thought that rabbit-config.xml would make the queues and exchanges in qpid broker  but to no avail. My flow is create queues and exchanges in qpid broker pass messages to them and inbound amqp adapters bounded to these queues would get messages and i can proceed with the test</p>
  
  <p>Error :  Queue: 'push.customer.arkona.controller.search' not found on VirtualHost 'default'.</p>
  
  <pre><code>    qpid-config.json:
  
      {   "name": "EmbeddedBroker",   "modelVersion": "2.0",   "storeVersion" : 1,   "authenticationproviders" : [ {
          "name" : "noPassword",
          "type" : "Anonymous",
          "secureOnlyMechanisms": []
              },
          {
            "name" : "passwordFile",
            "type" : "PlainPasswordFile",
            "path" : "${qpid.home_dir}${file.separator}src${file.separator}main${file.separator}resources${file.separator}password.properties",
            "secureOnlyMechanisms": []
          }    ],   "ports" : [
          {
            "name": "AMQP",
            "port": "${qpid.amqp_port}",
            "authenticationProvider": "passwordFile",
            "protocols": [
              "AMQP_0_10",
              "AMQP_0_8",
              "AMQP_0_9",
              "AMQP_0_9_1"
            ]
          }],
          "virtualhostnodes" : [ {
          "name" : "default",
          "type" : "JSON",
          "defaultVirtualHostNode" : "true",
          "virtualHostInitialConfiguration" : "${qpid.initial_config_virtualhost_config}",
           "storeType" : "DERBY"   
  } 
  ] 
  }
  </code></pre>
  
  <p>password.properties has </p>
  
  <blockquote>
    <p>guest:guest</p>
  </blockquote>
  
  <p>I have created a separate profile for running my tests. this is the rabbitmq configuration. apart from this i have a rabbit-context xml file where all the queues, exchanges are defined.</p>
  
  <pre><code>@Configuration
  @Profile("qpid")
  public class QpidConfig {
  
      String amqpPort = "5672";
  
      //String qpidHomeDir = "complete";
      String configFileName = "src/main/resources/qpid-config.json";
  
      @Bean
      BrokerOptions brokerOptions() {
  
          File tmpFolder= Files.createTempDir();
  
          //small hack, because userDir is not same when running Application and ApplicationTest
          //it leads to some issue locating the files after, so hacking it here
          String userDir=System.getProperty("user.dir").toString();
  
          File file = new File(userDir);
          String homePath = file.getAbsolutePath();
  
          BrokerOptions brokerOptions=new BrokerOptions();
  
          brokerOptions.setConfigProperty("qpid.work_dir", tmpFolder.getAbsolutePath());
          brokerOptions.setConfigProperty("qpid.amqp_port",amqpPort);
          brokerOptions.setConfigProperty("qpid.home_dir", homePath);
          brokerOptions.setInitialConfigurationLocation(homePath + "/"+configFileName);
  
          return brokerOptions;
      }
  
      @SuppressWarnings("rawtypes")
      @Bean
      Broker broker() throws Exception {
  
              org.apache.qpid.server.Broker broker = new org.apache.qpid.server.Broker();
          broker.startup(brokerOptions());
          return (Broker) broker;
      }
  
      private ConnectionFactory connectionFactory() {
          ConnectionFactory factory = new ConnectionFactory();
  
          factory.setUsername("admin");
          factory.setPassword("admin");
          factory.setHost("127.0.0.1");
          factory.setPort(5672);
          return factory;
      }
  
      @Bean(name ="rabbitConnectionFactory")
      public CachingConnectionFactory rabbitConnectionFactory(){
          return new CachingConnectionFactory(connectionFactory());
      }
  
      @Bean(name="rabbitTemplate")
      public RabbitTemplate rabbitTemplate(){
          return new RabbitTemplate(rabbitConnectionFactory());
      }
  
      @Bean(name ="arkonaHeaderMapper")
      public DefaultAmqpHeaderMapper syncerHeaderMapper() {
          DefaultAmqpHeaderMapper amqpHeaderMapper = DefaultAmqpHeaderMapper.inboundMapper();
          amqpHeaderMapper.setRequestHeaderNames("*");
          amqpHeaderMapper.setReplyHeaderNames("*");
          return amqpHeaderMapper;
      }
  
  
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>MY rabbit-context.xml </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:rabbit="http://www.springframework.org/schema/rabbit"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd"&gt;
  
      &lt;rabbit:queue name="pull.appt.arkona.scheduler.adapter" /&gt;
      &lt;rabbit:queue name="pull.appt.arkona.adapter.processor" /&gt;
  
      &lt;rabbit:queue name="pull.customer.arkona.to.lookup" /&gt;
      &lt;rabbit:queue name="pull.customer.arkona.lookup.processor" /&gt;
  
      &lt;rabbit:queue name="pull.customer.arkona.scheduler.adapter" /&gt;
  
      &lt;rabbit:queue name="pull.ro.arkona.to.lookup" /&gt;
      &lt;rabbit:queue name="pull.ro.arkona.adapter.processor" /&gt;
  
      &lt;rabbit:queue name="pull.ro.arkona.scheduler.adapter" /&gt;
  
      &lt;rabbit:queue name="pull.closed.arkona.scheduler.adapter" /&gt;
      &lt;rabbit:queue name="pull.parts.arkona.scheduler.adapter" /&gt;
  
      &lt;rabbit:queue name="pull.closed.arkona.adapter.processor" /&gt;
      &lt;rabbit:queue name="pull.parts.arkona.adapter.processor" /&gt;
  
      &lt;rabbit:queue name="pull.vehicle.arkona.to.lookup" /&gt;
      &lt;rabbit:queue name="pull.vehicle.arkona.lookup.processor" /&gt;
  
      &lt;rabbit:direct-exchange name="dms.arkona.exchange" durable="true"&gt;
          &lt;rabbit:bindings&gt;
              &lt;rabbit:binding queue="pull.appt.arkona.scheduler.adapter" key="pull.appt.arkona.scheduler.adapter.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.appt.arkona.adapter.processor" key="pull.appt.arkona.adapter.processor.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.customer.arkona.to.lookup" key="pull.customer.arkona.to.lookup.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.customer.arkona.lookup.processor" key="pull.customer.arkona.lookup.processor.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.customer.arkona.scheduler.adapter" key="pull.customer.arkona.scheduler.adapter.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.ro.arkona.to.lookup" key="pull.ro.arkona.to.lookup.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.ro.arkona.adapter.processor" key="pull.ro.arkona.adapter.processor.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.ro.arkona.scheduler.adapter" key="pull.ro.arkona.scheduler.adapter.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.vehicle.arkona.to.lookup" key="pull.vehicle.arkona.to.lookup.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.vehicle.arkona.lookup.processor" key="pull.vehicle.arkona.lookup.processor.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.closed.arkona.scheduler.adapter" key="pull.closed.arkona.scheduler.adapter.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.closed.arkona.adapter.processor" key="pull.closed.arkona.adapter.processor.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.parts.arkona.scheduler.adapter" key="pull.parts.arkona.scheduler.adapter.key"&gt;&lt;/rabbit:binding&gt;
              &lt;rabbit:binding queue="pull.parts.arkona.adapter.processor" key="pull.parts.arkona.adapter.processor.key"&gt;&lt;/rabbit:binding&gt;
          &lt;/rabbit:bindings&gt;
      &lt;/rabbit:direct-exchange&gt;
  &lt;/beans&gt;
  </code></pre>