GitHub user hossiendehghan989 added a comment to the discussion: [Q&A][Java SDK 
(Component)] 3.3.4 After upgrading from Dubbo 2 to Dubbo 3, requests to a 
service with multiple consumers get stuck during consumer initialization after 
the service is registered with Nacos. Is there a recommended solution?

`check=false` is not a readiness mechanism; it only prevents a missing optional 
provider from failing reference creation. It does not stop an HTTP request from 
blocking while the reference/subscription is still being built.

The fix should be to gate **Spring Cloud/Nacos HTTP registration** on 
application readiness, rather than adding a startup sleep:

1. Keep the instance invisible to the gateway during bootstrap (disable 
automatic Spring Cloud registration, or register it as `OUT_OF_SERVICE`/with a 
readiness-aware instance state).
2. Expose a readiness probe that becomes healthy only after the Dubbo 
`Module`/`Application` has started and the references required by the HTTP 
endpoints have been created. Keep liveness separate.
3. Register/enable the Nacos instance only after that readiness transition, and 
deregister it on shutdown.
4. If some references are intentionally optional, keep `check=false`, but make 
the endpoint return a deliberate 503/controlled fallback until that provider is 
available; do not let the first request trigger hidden initialization.

This removes the race without coupling correctness to timing. The useful 
verification is a cold start with the gateway polling discovery: no traffic 
should be routed before readiness, and after readiness a request should not be 
the first operation that creates a `ReferenceConfig` or waits for provider 
notification. Also confirm that the Dubbo and Spring Cloud Nacos registrations 
are not accidentally sharing a single readiness state.

GitHub link: 
https://github.com/apache/dubbo/discussions/16495#discussioncomment-18845891

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to