Didi Chuxing Interview Question

Can you implement a publisher-subscriber pattern?