Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please remove the feature of config subscription triggered automatically after Nacos client started #1317

Closed
HaojunRen opened this issue Jun 4, 2019 · 8 comments
Assignees
Labels
Milestone

Comments

@HaojunRen
Copy link

HaojunRen commented Jun 4, 2019

Please remove the feature of config subscription triggered automatically after Nacos client started

Refer to code follows:
https://github.com/Nepxion/Discovery/blob/master/discovery-common-nacos/src/main/java/com/nepxion/discovery/common/nacos/operation/NacosOperation.java

Here I have tow configs : partial and global config, if they are are all set, my requirement is that got global finally. But the feature of subscription config automatically will cause it out-of-order.

Another issue i don't know why the same config will be triggered 2 times

Apollo works fine. I remember it also works fine in nacos 0.8 or 0.6 version

请帮忙移除Nacos客户端启动后,自动触发订阅事件

我现在有两个配置,一个是全局配置,一个是局部配置,(Key不同),如果它们都在Nacos上做了配置,那么优先取全局配置,但是因为存在自动触发订阅事件,而且触发次序是无序的(有时候先触发全局配置,再触发局部配置),那么会造成Nacos Client拿到局部配置。取消掉自动触发订阅事件的功能,由用户在启动的时候,自己去取。

除此之外,还有个问题,该自动触发的功能,会触发两次。

我测试过Apolllo,不存在这个问题

@nacos-bot
Copy link
Collaborator

Hi @HaojunRen, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

Please remove the feature of config subscription triggered automatically after Nacos client started

Please remove the feature of config subscription triggered automatically after Nacos client started

Refer to code follows:
https://github.com/Nepxion/Discovery/blob/master/discovery-common-nacos/src/main/java/com/nepxion/discovery/common/nacos/operation/NacosOperation.java

Here I have tow configs : partial and global config, if they are are all set, my requirement is that got global finally. But the feature of subscription config automatically will cause it out-of-order.

Another issue i don't know why the same config will be triggered 2 times

Apollo works fine. I remember it also works fine in nacos 0.8 or 0.6 version

Please help remove the Nacos client and start the subscription event automatically after startup.

I now have two configurations, one is global configuration, one is local configuration, (Key is different), if they are configured on Nacos, then the global configuration is preferred, but because there is an automatic trigger subscription event, and the trigger order is Unordered (sometimes triggering global configuration first, then triggering local configuration) will cause Nacos Client to get local configuration. The function of automatically triggering the subscription event is cancelled, and the user picks it up at the time of startup.

In addition to this, there is a problem that the auto-trigger function will be triggered twice.

I tested Apolllo, there is no such problem, and I remember that Nacos had no problem with version 0.6 or 0.8 earlier.

@nacos-bot nacos-bot added the kind/feature type/feature label Jun 4, 2019
@nkorange
Copy link
Collaborator

nkorange commented Jun 4, 2019

后续会支持该功能

@HaojunRen
Copy link
Author

请尽快支持,谢谢

@chuntaojun
Copy link
Collaborator

I will try to solve

@chuntaojun
Copy link
Collaborator

请尽快支持,谢谢

你好,我在看Apollo对于配置的Listener也是自动触发的,请问下使用Apollo是不存在监听器触发无序这个问题吗?

@HaojunRen
Copy link
Author

HaojunRen commented Jun 15, 2019

我的意思是,第一次启动的时候,不应该去触发Listener,应该是由用户自己手工去获取。那么就不存在所谓的次序问题了,事实上,全局配置和局部配置,nacos上也无法判断出来。Apollo 上我测试过,不存在这个问题。

所谓的次序问题,是由界面上的更新次序为准,比如我在界面上更新了全局配置,那么该全局配置会覆盖掉服务内存中的局部配置,反之也如此。

@chuntaojun
Copy link
Collaborator

我的意思是,第一次启动的时候,不应该去触发Listener,应该是由用户自己手工去获取。那么就不存在所谓的次序问题了,事实上,全局配置和局部配置,nacos上也无法判断出来。Apollo 上我测试过,不存在这个问题。

好的,理解了,

@HaojunRen
Copy link
Author

如果你愿意我们可以在微信上交流,1394997

@nkorange nkorange added this to the 1.0.2 milestone Jun 17, 2019
@chuntaojun chuntaojun mentioned this issue Jun 28, 2019
5 tasks
@nkorange nkorange modified the milestones: 1.0.2, 1.1.0 Jul 6, 2019
@nkorange nkorange mentioned this issue Jul 6, 2019
5 tasks
@nkorange nkorange closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants