Some conversations do not have a natural termination point. For example, Subscribe-Notify continues indefinitely, unless the subscriber or the provider explicitly terminate it. Many other conversations require providers to allocate resources, such as storage, connections, or money for another conversation participant, such as a service consumer. In a loosely coupled setting, the provider should not hold these resources indefinitely, but should make sure the consumer is still present and does still require the resources. Otherwise, the service may hold resources for no longer existing clients and run out of resources before too long.
The following considerations play an important role in conversations that deal with resource management.
- Explicit vs. implicit termination. A conversation can be explicitly terminated by sending a specific message or implicitly, e.g. through a period of inactivity.
- Who can terminate? Some conversations can be terminated by any party while others can only be cancelled by a specific party.
- Division of responsibility. The responsibility to keep a conversation alive can rest with the initiator or the service provider, or both.
- Notification vs. silent termination. One party may decide to terminate the conversation without notifying the other party. The other party may find out implicitly or by encountering an error when it attempts to continue the conversation.