refactor publishing to move to relay instead of packet.