Skip to content

Commit

Permalink
Update API-design-guidelines.md
Browse files Browse the repository at this point in the history
Explicit subscription-end termination reason usage.
Fix camaraproject#243
  • Loading branch information
bigludo7 authored Oct 10, 2024
1 parent c29aecc commit 1a24c53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion documentation/API-design-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,11 @@ For consistency across CAMARA APIs, the uniform CloudEvents model must be used w
Note: For operational and troubleshooting purposes it is relevant to accommodate use of `x-correlator` header attribute. API listener implementations have to be ready to support and receive this data.
Specific event notification type "subscription-ends" is defined to inform listener about subscription termination. It is used when the `subscriptionExpireTime` or `subscriptionMaxEvents` has been reached, or, if the API server has to stop sending notification prematurely. For this specific event, the `data` must feature `terminationReason` attribute.
#### subscription-ends event
Specific event notification type "subscription-ends" is defined to inform listener about subscription termination.
It is used when the `subscriptionExpireTime` or `subscriptionMaxEvents` has been reached, or, if the API server has to stop sending notification prematurely, or if the subscription request is managed asynchronously by the server and it is not able to provide the service. For this specific event, the `data` must feature `terminationReason` attribute. An enumeration of `terminationReason` is provided in event-subscription-template.yaml.
Note: The "subscription-ends" notification is not counted in the `subscriptionMaxEvents`. (for example, if a client request a `subscriptionMaxEvents` to 2, later, received second notification, then a third notification will be sent for "subscription-ends")
#### Error definition for event notification
Expand Down

0 comments on commit 1a24c53

Please sign in to comment.