spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/provisioning/RabbitExchangeQueueProvisioner.java
private void autoBindDLQ(final String baseQueueName, String routingKey,
			RabbitCommonProperties properties) {
		boolean autoBindDlq = properties.isAutoBindDlq();
		if (this.logger.isDebugEnabled()) {
			this.logger.debug("autoBindDLQ=" + autoBindDlq + " for: " + baseQueueName);
		}
		if (autoBindDlq) {
			String dlqName;
			if (properties.getDeadLetterQueueName() == null) {
				dlqName = constructDLQName(baseQueueName);
			}
			else {
				dlqName = properties.getDeadLetterQueueName();
			}
			Queue dlq = new Queue(dlqName, true, false, false,
					queueArgs(dlqName, properties, true));
			declareQueue(dlqName, dlq);
			String dlxName = deadLetterExchangeName(properties);
			if (properties.isDeclareDlx()) {
				declareExchange(dlxName,
						new ExchangeBuilder(dlxName,
								properties.getDeadLetterExchangeType()).durable(true)
										.build());
			}
			Map<String, Object> arguments = new HashMap<>(properties.getDlqBindingArguments());
			Binding dlqBinding = new Binding(dlq.getName(), DestinationType.QUEUE,
					dlxName, properties.getDeadLetterRoutingKey() == null ? routingKey
							: properties.getDeadLetterRoutingKey(),
					arguments);
			declareBinding(dlqName, dlqBinding);
			if (properties instanceof RabbitConsumerProperties
					&& ((RabbitConsumerProperties) properties).isRepublishToDlq()) {
				/*
				 * Also bind with the base queue name when republishToDlq is used, which
				 * does not know about partitioning
				 */
				declareBinding(dlqName, new Binding(dlq.getName(), DestinationType.QUEUE,
						dlxName, baseQueueName, arguments));
			}
		}
	}
/**
	 * If so requested, declare the DLX/DLQ and bind it. The DLQ is bound to the DLX with
	 * a routing key of the original queue name because we use default exchange routing by
	 * queue name for the original message.
	 * @param baseQueueName The base name for the queue (including the binder prefix, if
	 * any).
	 * @param routingKey The routing key for the queue.
	 * @param properties the properties.
	 */
If so requested, declare the DLX/DLQ and bind it. The DLQ is bound to the DLX with
a routing key of the original queue name because we use default exchange routing by
queue name for the original message.
@param baseQueueName The base name for the queue (including the binder prefix, if
any).
@param routingKey The routing key for the queue.
@param properties the properties.
If so requested declare the DLX / DLQ and bind it . The DLQ is bound to the DLX with a routing key of the original queue name because we use default exchange routing by queue name for the original message . @param baseQueueName The base name for the queue ( including the binder prefix if any ) . @param routingKey The routing key for the queue . @param properties the properties .
private void autoBindDLQ(final String baseQueueName, String routingKey,
			RabbitCommonProperties properties) {
		boolean autoBindDlq = properties.isAutoBindDlq();
		if (this.logger.isDebugEnabled()) {
			this.logger.debug("autoBindDLQ=" + autoBindDlq + " for: " + baseQueueName);
		}
		if (autoBindDlq) {
			String dlqName;
			if (properties.getDeadLetterQueueName() == null) {
				dlqName = constructDLQName(baseQueueName);
			}
			else {
				dlqName = properties.getDeadLetterQueueName();
			}
			Queue dlq = new Queue(dlqName, true, false, false,
					queueArgs(dlqName, properties, true));
			declareQueue(dlqName, dlq);
			String dlxName = deadLetterExchangeName(properties);
			if (properties.isDeclareDlx()) {
				declareExchange(dlxName,
						new ExchangeBuilder(dlxName,
								properties.getDeadLetterExchangeType()).durable(true)
										.build());
			}
			Map<String, Object> arguments = new HashMap<>(properties.getDlqBindingArguments());
			Binding dlqBinding = new Binding(dlq.getName(), DestinationType.QUEUE,
					dlxName, properties.getDeadLetterRoutingKey() == null ? routingKey
							: properties.getDeadLetterRoutingKey(),
					arguments);
			declareBinding(dlqName, dlqBinding);
			if (properties instanceof RabbitConsumerProperties
					&& ((RabbitConsumerProperties) properties).isRepublishToDlq()) {
				/*
				 * Also bind with the base queue name when republishToDlq is used, which
				 * does not know about partitioning
				 */
				declareBinding(dlqName, new Binding(dlq.getName(), DestinationType.QUEUE,
						dlxName, baseQueueName, arguments));
			}
		}
	}
private void autoBindDLQ ( final String baseQueueName , String routingKey , RabbitCommonProperties properties ) { boolean autoBindDlq = properties . isAutoBindDlq ( ) ; if ( this . logger . isDebugEnabled ( ) ) { this . logger . debug ( "autoBindDLQ=" + autoBindDlq + " for: " + baseQueueName ) ; } if ( autoBindDlq ) { String dlqName ; if ( properties . getDeadLetterQueueName ( ) == null ) { dlqName = constructDLQName ( baseQueueName ) ; } else { dlqName = properties . getDeadLetterQueueName ( ) ; } Queue dlq = new Queue ( dlqName , true , false , false , queueArgs ( dlqName , properties , true ) ) ; declareQueue ( dlqName , dlq ) ; String dlxName = deadLetterExchangeName ( properties ) ; if ( properties . isDeclareDlx ( ) ) { declareExchange ( dlxName , new ExchangeBuilder ( dlxName , properties . getDeadLetterExchangeType ( ) ) . durable ( true ) . build ( ) ) ; } Map < String , Object > arguments = new HashMap < > ( properties . getDlqBindingArguments ( ) ) ; Binding dlqBinding = new Binding ( dlq . getName ( ) , DestinationType . QUEUE , dlxName , properties . getDeadLetterRoutingKey ( ) == null ? routingKey : properties . getDeadLetterRoutingKey ( ) , arguments ) ; declareBinding ( dlqName , dlqBinding ) ; if ( properties instanceof RabbitConsumerProperties && ( ( RabbitConsumerProperties ) properties ) . isRepublishToDlq ( ) ) { /*
				 * Also bind with the base queue name when republishToDlq is used, which
				 * does not know about partitioning
				 */ declareBinding ( dlqName , new Binding ( dlq . getName ( ) , DestinationType . QUEUE , dlxName , baseQueueName , arguments ) ) ; } } }
If so requested, declare the DLX/DLQ and bind it.
If so requested declare the DLX / DLQ and bind it .