title: First message to RabbitMQ queue causes channel shutdown
body: <p>The first message to my queue always fails.
  From the second one, <strong>everything works just fine!</strong></p>
  
  <p><a href="https://i.stack.imgur.com/3V2xE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3V2xE.png" alt="Stacktrace"></a></p>
  
  <p>Not sure if that's readable so :</p>
  
  <pre><code>Created new connection: rabbitConnectionFactory#1b940034:0/SimpleConnection@2c52fbff [delegate=amqp://guest@10.0.0.10:5672/, localPort= 36370]
  
  Channel shutdown: channel error; protocol method: #method&lt;channel.close&gt;(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'auto_delete' for exchange 'rabbitmq_exchange' in vhost '/': received 'false' but current is 'true', class-id=40, method-id=10)
  </code></pre>
  
  <p>I'm not sure why this is happening, because I launch this on a fresh VM (AWS EC2 instance) every single time. How could "current be true"?</p>
  
  <p>I suppose something is badly configured in the Spring Boot publisher:</p>
  
  <p><a href="https://i.stack.imgur.com/yIWFS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yIWFS.png" alt="enter image description here"></a></p>
  
  <p>Not sure if that's readable so :</p>
  
  <pre><code>@Configuration
  public class RabbitMqConfig {
      @Bean
      Queue queue() {
          return new Queue(System.getenv("RABBITMQ_QUEUE_NAME"), true,false, false);
      }
  
      @Bean
      DirectExchange exchange() {
          return new DirectExchange(System.getenv("RABBITMQ_EXCHANGE_NAME"), true, false);
      }
  
      @Bean
      Binding binding(Queue queue, DirectExchange exchange) {
          return BindingBuilder.bind(queue).to(exchange).with(System.getenv("RABBITMQ_ROUTING_KEY"));
      }
  
      @Bean
      public MessageConverter jsonMessageConverter(){
          return new Jackson2JsonMessageConverter();
      }
  
      public AmqpTemplate rabbitTemplate(ConnectionFactory connectionFactory) {
          final RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory);
          rabbitTemplate.setMessageConverter(jsonMessageConverter());
          return rabbitTemplate;
      }
  }
  </code></pre>
  
  <p>So what's going wrong here?
  Thanks!</p>