add publishsubscribe template