Skip to content

ServiceCenterRegistration注册成功时,有可能不推送MicroserviceRegistrationEvent #3457

@provenceee

Description

@provenceee

2.8.2版本,在RegisterMicroserviceTask中,如果schema ids不相等时,会尝试重新注册schema,此时服务已经注册成功,但没有推送MicroserviceRegistrationEvent。核心代码如下:

if (serviceCenterConfiguration.isCanOverwriteSwagger()) {
  LOGGER.warn("Service has already registered, but schema ids not equal, try to register it again");
  startTask(new RegisterSchemaTask(0));
  return;
}

应该需要在startTask(new RegisterSchemaTask(0));之前执行eventBus.post(new MicroserviceRegistrationEvent(true));把?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions