Source:
<code>private void declareExchangeAndBinding(QueueBinding binding, String queueName, org.springframework.amqp.rabbit.annotation.Exchange bindingExchange) { String exchangeName = resolveExpressionAsString(bindingExchange.value(), "@Exchange.exchange"); String exchangeType = resolveExpressionAsString(bindingExchange.type(), "@Exchange.type"); String routingKey = resolveExpressionAsString(binding.key(), "@QueueBinding.key"); Exchange exchange; Binding actualBinding; if (exchangeType.equals(ExchangeTypes.DIRECT)) { exchange = directExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.FANOUT)) { exchange = fanoutExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, "", resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.TOPIC)) { exchange = topicExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.HEADERS)) { exchange = headersExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else { throw new BeanInitializationException("Unexpected exchange type: " + exchangeType); } ((ConfigurableBeanFactory) this.beanFactory).registerSingleton(exchangeName + ++this.increment, exchange); ((ConfigurableBeanFactory) this.beanFactory).registerSingleton(exchangeName + ++this.increment, <START> actualBinding); <END> }</code><technical_language>H-m. exchangeName for Binding bean, if is a prefix. queueName/exchangeName combination for Binding bean? I is existing code, I mind discuss fix here</technical_language>

Target:
private void declareExchangeAndBinding(QueueBinding binding, String queueName, org.springframework.amqp.rabbit.annotation.Exchange bindingExchange) { String exchangeName = resolveExpressionAsString(bindingExchange.value(), "@Exchange.exchange"); String exchangeType = resolveExpressionAsString(bindingExchange.type(), "@Exchange.type"); String routingKey = resolveExpressionAsString(binding.key(), "@QueueBinding.key"); Exchange exchange; Binding actualBinding; if (exchangeType.equals(ExchangeTypes.DIRECT)) { exchange = directExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.FANOUT)) { exchange = fanoutExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, "", resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.TOPIC)) { exchange = topicExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else if (exchangeType.equals(ExchangeTypes.HEADERS)) { exchange = headersExchange(bindingExchange, exchangeName); actualBinding = new Binding(queueName, DestinationType.QUEUE, exchangeName, routingKey, resolveArguments(binding.arguments())); } else { throw new BeanInitializationException("Unexpected exchange type: " + exchangeType); } ((ConfigurableBeanFactory) this.beanFactory).registerSingleton(exchangeName + ++this.increment, exchange); ((ConfigurableBeanFactory) this.beanFactory).registerSingleton( exchangeName + "." + queueName + ++this.increment, actualBinding); }