Closed senlizishi closed 1 year ago
@Al-assad @MonsterChenzhuo cc
Wow, thank you for the reminder. It's our negligence that all asynchronous calls for Eventbus should indeed be marked with @AllowConcurrentEvents
. Can you submit a corresponding PR?
Search before asking
Description
I found that although asyncEventBus was created in
ChangeEventBus
, the thread pool parameter setting is relatively high, but the subscriber lacks the@AllowConcurrentEvents
annotation, which will cause asynchronous multi-threading to be ineffective.In
com.google.common.eventbus.Subscriber
Subscriber is returned if there is @AllowConcurrentEvents concern on the subscriber method, otherwise SynchronizedSubscriber is returned.I made a simple example to verify the effect of this annotation EventBusTest . As a result, as mentioned above, no
@AllowConcurrentEvents
is created for synchronous subscribers, and there is no asynchronous effect.Asynchronous if required. The way to modify is to add
@AllowConcurrentEvents
to the method that needs asynchronous. At the same time, adjust the thread pool parameters to make it more reasonable.The methods I have found to receive AsyncEvent are
FlinkK8sChangeEventListener.subscribeMetricsChange
,FlinkK8sChangeEventListener.subscribeCheckpointChange
,BuildInEventListener.subscribeFlinkJobStateEvent
. This requires further discussion and confirmation.Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct