8000 [Discuss] Shall we change Nacos-Client naming listener notify way (sync -> async) · Issue #4115 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Discuss] Shall we change Nacos-Client naming listener notify way (sync -> async) #4115
Closed
@horizonzy

Description

@horizonzy

Describe the topc
Now in com.alibaba.nacos.client.naming.core.EventDispatcher.Notifier.run, when get serviceChange from server, it will notify com.alibaba.nacos.client.naming.core.EventDispatcher.Notifier.run, find listener by serviceKey, and execute the callback.
But the callback is sync to execute, if some long time operation in the callback, it will blocking other service's notify.
Shall we add some info in docs to hint user, this callback is sync, if do long time operation, it will influence other listener or service to notify. let user execute it by thread they defined by themselves.
Or execute callback in thread pool which realized by framework.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0