You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/service-registration/custom-service-registration.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,9 @@ Finally, you can implement your own service deregistration mechanism in `deregis
88
88
The default implementations of the second and third methods fall back to the first, which may deregister **all** instances.
89
89
**Custom registrar implementations should override at least one of the specific-instance methods** to provide precise, instance-level deregistration and avoid unintended side effects.
90
90
91
+
Note that the `Service` class wraps these with simpler methods that do not require passing the service name:
92
+
`deregisterNamedInstance(instanceName)`, `deregisterServiceInstance(ipAddress, port)`, and the deprecated no-arg `deregisterServiceInstance()`.
93
+
91
94
92
95
## Using your service registrar using the programmatic API
Copy file name to clipboardExpand all lines: docs/docs/service-registration/overview.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,13 +39,13 @@ SmallRye Stork now supports deregistration of service instances from a central r
39
39
This feature complements the registration mechanism.
40
40
41
41
This operation is typically should be triggered when a service instance is shut down or no longer available, helping maintain a consistent and accurate service registry.
42
-
To enable service deregistration, you can invoke the `deregisterServiceInstance` method on the `ServiceRegistrar` implementation programmatically.
43
-
To target a specific instance, prefer one of these overloads:
42
+
To enable service deregistration, you can invoke the deregistration methods on the `Service` instance programmatically.
43
+
To target a specific instance, prefer one of these methods:
44
44
45
-
-`deregisterServiceInstance(serviceName, instanceName)` — deregisters the instance registered under the given name.
46
-
-`deregisterServiceInstance(serviceName, ipAddress, port)` — deregisters the instance identified by IP and port.
45
+
-`deregisterNamedInstance(instanceName)` — deregisters the instance registered under the given name.
46
+
-`deregisterServiceInstance(ipAddress, port)` — deregisters the instance identified by IP and port.
47
47
48
-
The single-argument overload `deregisterServiceInstance(serviceName)` deregisters **all** instances of the service.
48
+
The no-argument overload `deregisterServiceInstance()` deregisters **all** instances of the service and is deprecated, prefer one of the specific methods above.
49
49
50
50
**Note**: When used in standalone mode, Stork does **not** automatically handle service instance registration or deregistration.
51
51
However, when using the quarkus-stork-registration extension within a Quarkus application,
0 commit comments