use of com.alibaba.rsocket.events.ServicesHiddenEvent in project alibaba-rsocket-broker by alibaba.
the class RSocketBrokerClient method removeService.
public void removeService(String serviceName, Class<?> serviceInterface) {
ServiceLocator targetService = new ServiceLocator("", serviceName, "");
CloudEventImpl<ServicesHiddenEvent> cloudEvent = ServicesHiddenEvent.convertServicesToCloudEvent(Collections.singletonList(targetService));
upstreamManager.findBroker().getLoadBalancedRSocket().fireCloudEventToUpstreamAll(cloudEvent).doOnSuccess(unused -> {
this.serviceCaller.removeProvider("", serviceName, "", serviceInterface);
}).subscribe();
}
Aggregations