Implemented ToJson and propagated error at FromJson
Adapted to the new api
Adapted to the new FromJson API
Publising to amqp exchange