protected void bindExistingProducerDirectlyIfPossible(String name, MessageChannel consumerChannel) {
		if (!isNamedChannel(name)) {
			Binding producerBinding = null;
			synchronized (this.bindings) {
				for (Binding binding : this.bindings) {
					if (binding.getName().equals(name) && Binding.PRODUCER.equals(binding.getType())) {
						producerBinding = binding;
						break;
					}
				}
				if (producerBinding != null && producerBinding.getChannel() instanceof SubscribableChannel) {
					AbstractBusPropertiesAccessor properties = producerBinding.getPropertiesAccessor();
					if (properties.isDirectBindingAllowed()) {
						bindProducerDirectly(name, (SubscribableChannel) producerBinding.getChannel(), consumerChannel,
								properties);
						producerBinding.stop();
						this.bindings.remove(producerBinding);
					}
				}
			}
		}
	}
Attempt to bind a producer directly (avoiding the bus) if there is already a local producer. PubSub producers
cannot be bound directly. Create the direct binding, then unbind the existing bus producer.
@param name The name.
@param consumerChannel The channel to bind the producer to.
spring-xd-messagebus-spi/src/main/java/org/springframework/xd/dirt/integration/bus/MessageBusSupport.java