set up publishing and subscriptions