What would you like to be added:
Support async event dispatch in EventBus.
- Use a buffer channel to temporarily store events, and provide the channel size as a configurable option for users.
- Keep the subscribe/consume logic same as Sync pattern.
Why is this needed:
The EventBus only support to dispatch events synchronously, implies that all events needs to be processed immediately. However, in some scenarios, there are numerous events that do not require synchronous blocking processing. Therefore, we need to support asynchronous distribution of events.
What would you like to be added:
Support async event dispatch in EventBus.
Why is this needed:
The EventBus only support to dispatch events synchronously, implies that all events needs to be processed immediately. However, in some scenarios, there are numerous events that do not require synchronous blocking processing. Therefore, we need to support asynchronous distribution of events.