[communication] Implement middleware and 1-way callback