private boolean deleteObjectFromCache(final DistributedCacheObject<RegisteredService> item) {
        if (item.containsProperty("event")) {
            val event = item.getProperty("event", String.class);
            if (event.equalsIgnoreCase(CasRegisteredServiceDeletedEvent.class.getSimpleName())) {
                cacheManager.remove(item.getValue(), item, false);
                return true;
            }
        }
        return false;
    }
Registered service distributed cache kafka listener.

@param item the item
support/cas-server-support-service-registry-stream-kafka/src/main/java/org/apereo/cas/services/RegisteredServiceKafkaDistributedCacheListener.java