Acknowledge, Commit, Rollback, or Recover a Session

post

/sessions/{sessionName}/state

Perform the specified operation.  If the action is acknowledge or recover, and the session is set to acknowledge messages automatically (either with acknowledgement mode auto or dups_ok), this is a no-op.  If the action is commit or rollback, and the session is not transacted, this is a no-op.  If the action is recover and the session is transacted, a 500 error response is generated.

Request

Path Parameters
Query Parameters
  • Required.  The action to take on the session. It must have value acknowledge, commit, rollback, or recover.  The value determines whether the operation is to acknowledge any unacknowledged messages received through the session, commit any uncommitted sends and receives, roll back any uncommitted sends and receives, or recover any unacknowledged messages.
Back to Top

Response

200 Response

Action completed successfully.

400 Response

Error Codes

  • missingParameter:The action parameter was not supplied.
  • badParameter:The value of the action parameter was not acknowledge, commit, rollback, or recover.

404 Response

Error Codes

  • sessionNotFound:The requested session does not exist.

500 Response

Error Codes

  • operationFailed:A low-level exception occurred in attempting to execute the specified action.
Back to Top

Examples

cURL Commands

Create a transacted session.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X PUT "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/sessions/myFirstSession?connection=myFirstConnection&transacted=true"

There is no request body to submit with the HTTP request and there is no response body.

Commit the session.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/sessions/myFirstSession/state?action=commit"

There is no request body to submit with the HTTP request and there is no response body.

Rollback the session.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/sessions/myFirstSession/state?action=rollback"

There is no request body to submit with the HTTP request and there is no response body.

Back to Top