If a provider needs to remove a service from the list of known services, it should send the service’s MapEntry with the action set to MapEntry.Delete. A consumer should place all open items associated with this service in the OmmState.ClosedRecover.
All services associated with a Source Directory stream are removed if:
• The connection between the provider and consumer is closed or lost
• The provider sends a state of OmmState.Closed or OmmState.ClosedRecover on the Source Directory stream.
• The provider sends a message with a ClearCache on a StatusMsg on the Source Directory stream.
If any of these events occurs, all of the items for the service(s) are automatically cleaned up and considered to have a ClosedRecover status.
NOTE: Though not best practice, some applications may continue to store service information, even after a service is removed. If this is the case, the application should advertise the service as Down and not accepting requests.