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);
}
});
}