@Override
	public void preProcessModule(final Module module) {
		Properties properties = new Properties();
		properties.setProperty(XD_STREAM_NAME_KEY, module.getDescriptor().getGroup());
		module.addProperties(properties);
		if (module.getType() == ModuleType.sink) {
			module.addListener(new ApplicationListener<ApplicationPreparedEvent>() {

				@Override
				public void onApplicationEvent(ApplicationPreparedEvent event) {
					Properties producerProperties = extractConsumerProducerProperties(module)[1];
					MessageBusAwareRouterBeanPostProcessor bpp =
							new MessageBusAwareRouterBeanPostProcessor(messageBus, producerProperties);
					bpp.setBeanFactory(event.getApplicationContext().getBeanFactory());
					event.getApplicationContext().getBeanFactory().addBeanPostProcessor(bpp);
				}

			});
		}
	}
@author Mark Fisher
@author Gary Russell
@author David Turanski
@author Jennifer Hickey
@author Glenn Renfro
@author Ilayaperumal Gopinathan
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/plugins/stream/StreamPlugin.java