protected final void bindConsumerAndProducers(final Module module) {
		boolean trackHistory = module.getDeploymentProperties() != null
				? module.getDeploymentProperties().getTrackHistory()
				: false;
		Properties[] properties = extractConsumerProducerProperties(module);
		Map<String, Object> historyProperties = null;
		if (trackHistory) {
			historyProperties = extractHistoryProperties(module);
			addHistoryTag(module, historyProperties);
		}
		MessageChannel outputChannel = module.getComponent(MODULE_OUTPUT_CHANNEL, MessageChannel.class);
		if (outputChannel != null) {
			bindMessageProducer(outputChannel, getOutputChannelName(module), properties[1]);
			String tapChannelName = buildTapChannelName(module);
			tappableChannels.put(tapChannelName, outputChannel);
			if (isTapActive(tapChannelName)) {
				createAndBindTapChannel(tapChannelName, outputChannel);
			}
			if (trackHistory) {
				track(module, outputChannel, historyProperties);
			}
		}
		MessageChannel inputChannel = module.getComponent(MODULE_INPUT_CHANNEL, MessageChannel.class);
		if (inputChannel != null) {
			bindMessageConsumer(inputChannel, getInputChannelName(module), module.getDescriptor().getGroup(),
					properties[0]);
			if (trackHistory && module.getType().equals(ModuleType.sink)) {
				track(module, inputChannel, historyProperties);
			}
		}
	}
Bind input/output channel of the module's message consumer/producers to {@link MessageBus}'s message
source/target entities. The producer must be bound first so that messages can immediately
start flowing from the consumer.

@param module the module whose consumer and producers to bind to the {@link MessageBus}.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/plugins/AbstractMessageBusBinderPlugin.java