updated so we can use amqp/mqtt