updated bridge for publishing json messages