Added sending message to RabbitMQ on each state change