Delete a Durable Subscription
delete
/sessions/{sessionName}/subscriptions/{subscriptionName}
Delete the subscription whose client ID is that set on the connection and whose name is that given on the path.
Request
Path Parameters
-
sessionName: string
The name of the session.
-
subscriptionName: string
The name of the durable subscription.
Response
204 Response
Connection closed and deleted.
404 Response
Error Codes
sessionNotFound
:The requested session does not exist.subscriptionNotFound
:The requested durable subscription does not exist.
500 Response
Error Codes
operationFailed
:A low-level exception occurred in attempting to delete the subscription.
Examples
cURL Command
The subscription is a combination of client id, topic name and subscription name. This is why the DELETE requires the session to also be part of the path. In JMS subscriptions aren't 'deleted' instead the term is unsubscribe, but the result is the same.
cookie=/tmp/messaging-cookie curl -s -u $USER:$PASS -c $cookie -b $cookie \ -H "X-OC-ID-TOKEN-STATUS: disabled" \ -X DELETE "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/sessions/myFirstSession/subscriptions/myFirstSubscription"
There is no request body to submit with the HTTP request and there is no response body.
Back to Top