-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Simplified service discovery and refactoring of registry events #342
Simplified service discovery and refactoring of registry events #342
Conversation
@@ -23,7 +23,9 @@ | |||
|
|||
ServiceEndpoint unregisterService(String endpointId); | |||
|
|||
Flux<RegistryEvent> listen(); | |||
Flux<ReferenceRegistryEvent> listenReferenceEvents(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont like this contract its bloated to have this kind in the interface
maybe we can provide more clean interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like:
listen(RegistryEvent::reference)
listen(RegistryEvent::endpoint)
Flux<RegistryEvent> listen(); | ||
Flux<ReferenceRegistryEvent> listenReferenceEvents(); | ||
|
||
Flux<EndpointRegistryEvent> listenEndpointEvents(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
…rvices # Conflicts: # benchmarks/src/main/java/io/scalecube/services/benchmarks/services/ServicesBenchmarksState.java # examples/src/main/java/io/scalecube/examples/BootstrapExample.java # examples/src/main/java/io/scalecube/examples/helloworld/Example1.java # examples/src/main/java/io/scalecube/examples/helloworld/Example2.java # examples/src/main/java/io/scalecube/examples/orderbook/Example1.java # services/src/test/java/io/scalecube/services/ErrorFlowTest.java # services/src/test/java/io/scalecube/services/ServiceCallRemoteTest.java # services/src/test/java/io/scalecube/services/ServiceRegistryEventsTest.java # services/src/test/java/io/scalecube/services/ServiceRemoteTest.java # services/src/test/java/io/scalecube/services/ServiceTransportTest.java # services/src/test/java/io/scalecube/services/StreamingServiceTest.java # services/src/test/java/io/scalecube/services/routings/RoutersTest.java # services/src/test/java/io/scalecube/services/routings/ServiceTagsExample.java
part of #331
Motivation:
For now, we have two approaches to subscribe to an available/unavailable endpoint events. But the way via discovery has a side effect. because we can receiver
registered event
with some endpoint inside it and this endpoint is not registered in the service registry yet.