-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
How to dynamically register services #825
Comments
after microservices has started its already an immutable object. you can checkout the examples and the tests inside the project https://github.com/scalecube/scalecube-services/tree/master/services-examples the main idea is that any node can be a when a member joins a cluster he can just start or start pointing to some seed member.
|
Sorry,Maybe you don't understand my scenes. ServiceMethodRegistry registry = new ServiceMethodRegistryImpl();
Microservices ms =
Microservices.builder()
.discovery(
"ms",
endpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(endpoint))
.membership(cfg -> cfg.seedMembers(seedAddress)))
.transport(RSocketServiceTransport::new)
.methodRegistry(registry)
.startAwait();
// register a service after Microservices started
registry.registerService(ServiceInfo
.fromServiceInstance(new GreetingServiceImpl())
....
.build()) |
ohh i see |
Lines 185 to 198 in 909a2e1
|
scalecube is an open source project - anyone is welcome to fork/offer improvements. |
ok thanks
发自我的iPhone
…------------------ Original ------------------
From: Ronen ***@***.***>
Date: Thu,Nov 18,2021 6:44 PM
To: scalecube/scalecube-services ***@***.***>
Cc: 老周 ***@***.***>, Author ***@***.***>
Subject: Re: [scalecube/scalecube-services] How to dynamically register services (Issue #825)
scalecube is an open source project - anyone is welcome to fork/offer improvements.
pull request are considered/accepted with a reasoning what is the motivation for the improvement.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Some scenes,I need dynamically register services after
Microservices
started.The text was updated successfully, but these errors were encountered: