refactoring to use pika consumer callback method