new utility queue-json, and another change to help with draining from and republishing to amqp