factor rabbitmq listener code to AsyncronousSearchTest class